From 278469515403a219f2d4f9dd11544670d5eb68da Mon Sep 17 00:00:00 2001 From: Thilanka Kaushalya Date: Sun, 31 Jul 2011 12:20:17 +0530 Subject: [PATCH 01/67] Ajaxify the table coppy option in table operations --- js/functions.js | 35 ++++++++++++++++++++++++++++++++++- tbl_move_copy.php | 7 +++++++ tbl_operations.php | 2 +- 3 files changed, 42 insertions(+), 2 deletions(-) diff --git a/js/functions.js b/js/functions.js index bbe00b51d3..d612d8948d 100644 --- a/js/functions.js +++ b/js/functions.js @@ -1961,10 +1961,43 @@ $(document).ready(function() { $("#result_query .notice").remove(); $("#result_query").prepend((data.message)); } else { - PMA_ajaxShowMessage(data.error); + $temp_div = $("
") + $temp_div.html(data.error); + $error = $temp_div.find("code").addClass("error"); + PMA_ajaxShowMessage($error); } }) // end $.post() });//end of alterTableOrderby ajax submit + + /** + *Ajax action for submitting the "Copy table" + **/ + $("#copyTable.ajax").live('submit', function(event) { + event.preventDefault(); + $form = $(this); + + PMA_prepareForAjaxRequest($form); + /*variables which stores the common attributes*/ + $.post($form.attr('action'), $form.serialize()+"&submit_copy=Go", function(data) { + if ($("#sqlqueryresults").length != 0) { + $("#sqlqueryresults").remove(); + } + if (data.success == true) { + PMA_ajaxShowMessage(data.message); + $("
").insertAfter("#topmenucontainer"); + $("#sqlqueryresults").html(data.sql_query); + $("#result_query .notice").remove(); + $("#result_query").prepend((data.message)); + $("#copyTable").find("select[name='target_db'] option[value='sakila']").attr('selected', 'selected'); + } else { + $temp_div = $("
") + $temp_div.html(data.error); + $error = $temp_div.find("code").addClass("error"); + PMA_ajaxShowMessage($error); + } + }) // end $.post() + });//end of copyTable ajax submit + }, 'top.frame_content'); //end $(document).ready for 'Table operations' diff --git a/tbl_move_copy.php b/tbl_move_copy.php index 330edcc0be..622a807bf3 100644 --- a/tbl_move_copy.php +++ b/tbl_move_copy.php @@ -65,6 +65,13 @@ if (PMA_isValid($_REQUEST['new_name'])) { $db = $_REQUEST['target_db']; $table = $_REQUEST['new_name']; } + + if ( $GLOBALS['is_ajax_request'] == true) { + $extra_data['sql_query'] = PMA_showMessage(NULL, $sql_query); + $extra_data['db'] = $GLOBALS['db']; + PMA_ajaxResponse($message, $message->isSuccess(), $extra_data); + } + $reload = 1; } } else { diff --git a/tbl_operations.php b/tbl_operations.php index 3481fd1cd6..dff735bab7 100644 --- a/tbl_operations.php +++ b/tbl_operations.php @@ -532,7 +532,7 @@ if (isset($possible_row_formats[$tbl_type])) {
-
onsubmit="return emptyFormElements(this, 'new_name')"> From 66fbb2da266c19cd6631eef9f80dc38fef4b84dd Mon Sep 17 00:00:00 2001 From: Thilanka Kaushalya Date: Sun, 31 Jul 2011 22:53:02 +0530 Subject: [PATCH 02/67] Fixed the bugs in table copy of table operations --- js/functions.js | 58 ++++++++++++++++++++++++++++------------------ tbl_alter.php | 4 ++-- tbl_move_copy.php | 2 +- tbl_operations.php | 4 ++-- 4 files changed, 40 insertions(+), 28 deletions(-) diff --git a/js/functions.js b/js/functions.js index d612d8948d..2e928a01e6 100644 --- a/js/functions.js +++ b/js/functions.js @@ -1954,6 +1954,9 @@ $(document).ready(function() { if ($("#sqlqueryresults").length != 0) { $("#sqlqueryresults").remove(); } + if ($("#result_query").length != 0) { + $("#result_query").remove(); + } if (data.success == true) { PMA_ajaxShowMessage(data.message); $("
").insertAfter("#topmenucontainer"); @@ -1972,30 +1975,39 @@ $(document).ready(function() { /** *Ajax action for submitting the "Copy table" **/ - $("#copyTable.ajax").live('submit', function(event) { + $("#copyTable.ajax input[name='submit_copy']").live('click', function(event) { event.preventDefault(); - $form = $(this); - - PMA_prepareForAjaxRequest($form); - /*variables which stores the common attributes*/ - $.post($form.attr('action'), $form.serialize()+"&submit_copy=Go", function(data) { - if ($("#sqlqueryresults").length != 0) { - $("#sqlqueryresults").remove(); - } - if (data.success == true) { - PMA_ajaxShowMessage(data.message); - $("
").insertAfter("#topmenucontainer"); - $("#sqlqueryresults").html(data.sql_query); - $("#result_query .notice").remove(); - $("#result_query").prepend((data.message)); - $("#copyTable").find("select[name='target_db'] option[value='sakila']").attr('selected', 'selected'); - } else { - $temp_div = $("
") - $temp_div.html(data.error); - $error = $temp_div.find("code").addClass("error"); - PMA_ajaxShowMessage($error); - } - }) // end $.post() + $form = $("#copyTable"); + if($form.find("input[name='switch_to_new']").attr('checked')) { + $form.append(''); + $form.removeClass('ajax'); + $form.find("#ajax_request_hidden").remove(); + $form.submit(); + } else { + PMA_prepareForAjaxRequest($form); + /*variables which stores the common attributes*/ + $.post($form.attr('action'), $form.serialize()+"&submit_copy=Go", function(data) { + if ($("#sqlqueryresults").length != 0) { + $("#sqlqueryresults").remove(); + } + if ($("#result_query").length != 0) { + $("#result_query").remove(); + } + if (data.success == true) { + PMA_ajaxShowMessage(data.message); + $("
").insertAfter("#topmenucontainer"); + $("#sqlqueryresults").html(data.sql_query); + $("#result_query .notice").remove(); + $("#result_query").prepend((data.message)); + $("#copyTable").find("select[name='target_db'] option[value="+data.db+"]").attr('selected', 'selected'); + } else { + $temp_div = $("
") + $temp_div.html(data.error); + $error = $temp_div.find("code").addClass("error"); + PMA_ajaxShowMessage($error); + } + }) // end $.post() + } });//end of copyTable ajax submit }, 'top.frame_content'); //end $(document).ready for 'Table operations' diff --git a/tbl_alter.php b/tbl_alter.php index 807a39ec80..6c46c9f2ee 100644 --- a/tbl_alter.php +++ b/tbl_alter.php @@ -130,9 +130,9 @@ if (isset($_REQUEST['do_save_data'])) { } } - if ( $GLOBALS['is_ajax_request'] == true) { + if ( $_REQUEST['ajax_request'] == true) { $extra_data['sql_query'] = PMA_showMessage(NULL, $sql_query); - PMA_ajaxResponse($message, $message->isSuccess(),$extra_data); + PMA_ajaxResponse($message, $message->isSuccess(), $extra_data); } $active_page = 'tbl_structure.php'; diff --git a/tbl_move_copy.php b/tbl_move_copy.php index 622a807bf3..58d90f347f 100644 --- a/tbl_move_copy.php +++ b/tbl_move_copy.php @@ -66,7 +66,7 @@ if (PMA_isValid($_REQUEST['new_name'])) { $table = $_REQUEST['new_name']; } - if ( $GLOBALS['is_ajax_request'] == true) { + if ( $_REQUEST['ajax_request'] == true) { $extra_data['sql_query'] = PMA_showMessage(NULL, $sql_query); $extra_data['db'] = $GLOBALS['db']; PMA_ajaxResponse($message, $message->isSuccess(), $extra_data); diff --git a/tbl_operations.php b/tbl_operations.php index dff735bab7..3e9bdebc4d 100644 --- a/tbl_operations.php +++ b/tbl_operations.php @@ -229,7 +229,7 @@ if (isset($result) && empty($message_to_show)) { $_message = $result ? $message = PMA_Message::success(__('Your SQL query has been executed successfully')) : PMA_Message::error(__('Error')); // $result should exist, regardless of $_message $_type = $result ? 'success' : 'error'; - if ( $GLOBALS['is_ajax_request'] == true) { + if ( $_REQUEST['ajax_request'] == true) { $extra_data['sql_query'] = PMA_showMessage(NULL, $sql_query); PMA_ajaxResponse($_message,$_message->isSuccess() ,$extra_data); } @@ -238,7 +238,7 @@ if (isset($result) && empty($message_to_show)) { $_message = new PMA_Message; $_message->addMessages($warning_messages); $_message->isError(true); - if ( $GLOBALS['is_ajax_request'] == true) { + if ( $_REQUEST['ajax_request'] == true) { PMA_ajaxResponse($_message, false); } unset($warning_messages); From 9b65d400d3ba3cf2341e67e5cafc2708c9e19eaa Mon Sep 17 00:00:00 2001 From: Yuichiro Date: Mon, 1 Aug 2011 12:38:06 +0200 Subject: [PATCH 03/67] Translation update done using Pootle. --- po/ja.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/po/ja.po b/po/ja.po index 45da9a4aff..9f7e86336f 100644 --- a/po/ja.po +++ b/po/ja.po @@ -4,13 +4,13 @@ msgstr "" "Project-Id-Version: phpMyAdmin 3.5.0-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2011-07-30 14:14-0400\n" -"PO-Revision-Date: 2011-07-27 12:14+0200\n" +"PO-Revision-Date: 2011-08-01 12:38+0200\n" "Last-Translator: Yuichiro \n" "Language-Team: japanese \n" +"Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: ja\n" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: Pootle 2.0.5\n" @@ -1217,7 +1217,7 @@ msgstr "" #: js/messages.php:118 msgid "log_output is not set to TABLE." -msgstr "" +msgstr "log_output がテーブルに設定されていません。" #: js/messages.php:119 msgid "log_output is set to TABLE." From 566b75f0478a12ca9d154ec6275643802ade3217 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Mon, 1 Aug 2011 12:38:15 +0200 Subject: [PATCH 04/67] Translation update done using Pootle. --- po/fr.po | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/po/fr.po b/po/fr.po index 839fdec93a..f80a135ba9 100644 --- a/po/fr.po +++ b/po/fr.po @@ -4,13 +4,13 @@ msgstr "" "Project-Id-Version: phpMyAdmin 3.5.0-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2011-07-30 14:14-0400\n" -"PO-Revision-Date: 2011-07-29 16:58+0200\n" +"PO-Revision-Date: 2011-08-01 12:38+0200\n" "Last-Translator: Marc Delisle \n" "Language-Team: french \n" +"Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: fr\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: Pootle 2.0.5\n" @@ -1342,6 +1342,10 @@ msgid "" "However only the SQL query itself has been used as a grouping criteria, so " "the other attributes of queries, such as start time, may differ." msgstr "" +"Cette colonne montre le nombre de requêtes identiques qui sont regroupées. " +"Cependant, seulement le texte SQL de la requête a été utilisé comme critère " +"de regroupement, donc les autres propriétés des requêtes, comme l'heure de " +"début, peuvent différer." #: js/messages.php:144 msgid "" From a15f84b036beb82bce327871307d6be06d27c646 Mon Sep 17 00:00:00 2001 From: Yuichiro Date: Mon, 1 Aug 2011 12:40:57 +0200 Subject: [PATCH 05/67] Translation update done using Pootle. --- po/ja.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/po/ja.po b/po/ja.po index 9f7e86336f..13dda0e977 100644 --- a/po/ja.po +++ b/po/ja.po @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 3.5.0-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2011-07-30 14:14-0400\n" -"PO-Revision-Date: 2011-08-01 12:38+0200\n" +"PO-Revision-Date: 2011-08-01 12:40+0200\n" "Last-Translator: Yuichiro \n" "Language-Team: japanese \n" "Language: ja\n" @@ -1221,7 +1221,7 @@ msgstr "log_output がテーブルに設定されていません。" #: js/messages.php:119 msgid "log_output is set to TABLE." -msgstr "" +msgstr "log_output はテーブルに設定されています。" #: js/messages.php:120 #, php-format From 6049062c7dcbb191c6cf61940eead018b57fc7e7 Mon Sep 17 00:00:00 2001 From: Yuichiro Date: Mon, 1 Aug 2011 12:41:22 +0200 Subject: [PATCH 06/67] Translation update done using Pootle. --- po/ja.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/po/ja.po b/po/ja.po index 13dda0e977..580ce79d53 100644 --- a/po/ja.po +++ b/po/ja.po @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 3.5.0-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2011-07-30 14:14-0400\n" -"PO-Revision-Date: 2011-08-01 12:40+0200\n" +"PO-Revision-Date: 2011-08-01 12:41+0200\n" "Last-Translator: Yuichiro \n" "Language-Team: japanese \n" "Language: ja\n" @@ -1217,7 +1217,7 @@ msgstr "" #: js/messages.php:118 msgid "log_output is not set to TABLE." -msgstr "log_output がテーブルに設定されていません。" +msgstr "log_output はテーブルに設定されていません。" #: js/messages.php:119 msgid "log_output is set to TABLE." From ffcd0d8139c54e2596b8a348a70b29993813c314 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Mon, 1 Aug 2011 12:42:35 +0200 Subject: [PATCH 07/67] Translation update done using Pootle. --- po/fr.po | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/po/fr.po b/po/fr.po index f80a135ba9..de205e4189 100644 --- a/po/fr.po +++ b/po/fr.po @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 3.5.0-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2011-07-30 14:14-0400\n" -"PO-Revision-Date: 2011-08-01 12:38+0200\n" +"PO-Revision-Date: 2011-08-01 12:42+0200\n" "Last-Translator: Marc Delisle \n" "Language-Team: french \n" "Language: fr\n" @@ -9996,6 +9996,11 @@ msgid "" "enabled. Note however, that the general_log produces a lot of data and " "increases server load by up to 15%" msgstr "" +"Le moniteur phpMyAdmin peut vous aider à optimiser la configuration serveur " +"et à traquer les requêtes qui prennent beaucoup de temps. Pour ce faire vous " +"devrez régler le paramètre log_output à 'TABLE' et activer le journal " +"slow_query_log ou general_log. Cependant, general_log produit beaucoup de " +"données et augmente jusqu'à 15% la charge du serveur" #: server_status.php:1371 msgid "" From 6a0af21e73e38926c3ef0c8a7c2a70d9cd9a15de Mon Sep 17 00:00:00 2001 From: Yuichiro Date: Mon, 1 Aug 2011 12:42:40 +0200 Subject: [PATCH 08/67] Translation update done using Pootle. --- po/ja.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/po/ja.po b/po/ja.po index 580ce79d53..db31575da4 100644 --- a/po/ja.po +++ b/po/ja.po @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 3.5.0-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2011-07-30 14:14-0400\n" -"PO-Revision-Date: 2011-08-01 12:41+0200\n" +"PO-Revision-Date: 2011-08-01 12:42+0200\n" "Last-Translator: Yuichiro \n" "Language-Team: japanese \n" "Language: ja\n" @@ -1246,10 +1246,10 @@ msgstr "" #. l10n: %s is FILE or TABLE #: js/messages.php:124 -#, fuzzy, php-format +#, php-format #| msgid "Save output to a file" msgid "Set log_output to %s" -msgstr "出力をファイルに保存する" +msgstr "%s に log_output を設定する" #. l10n: Enable in this context means setting a status variable to ON #: js/messages.php:126 From 9e91fb4aeef46173d84af9f5cd6998d5bdf67382 Mon Sep 17 00:00:00 2001 From: Yuichiro Date: Mon, 1 Aug 2011 12:45:18 +0200 Subject: [PATCH 09/67] Translation update done using Pootle. --- po/ja.po | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/po/ja.po b/po/ja.po index db31575da4..7babbb89b1 100644 --- a/po/ja.po +++ b/po/ja.po @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 3.5.0-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2011-07-30 14:14-0400\n" -"PO-Revision-Date: 2011-08-01 12:42+0200\n" +"PO-Revision-Date: 2011-08-01 12:45+0200\n" "Last-Translator: Yuichiro \n" "Language-Team: japanese \n" "Language: ja\n" @@ -9818,7 +9818,6 @@ msgid "Monitor Instructions" msgstr "はじめに" #: server_status.php:1364 -#, fuzzy #| msgid "" #| "The phpMyAdmin Monitor can assist you in optimizing the server " #| "configuration and track down time intensive\n" @@ -9834,11 +9833,9 @@ msgid "" "enabled. Note however, that the general_log produces a lot of data and " "increases server load by up to 15%" msgstr "" -"phpMyAdmin モニタは、サーバ構成の最適化を支援し、時間のかかるクエリを追跡する" -"ことができます。後者の場合には、テーブルに log_output を設定し、" -"slow_query_log または general_log のいずれかを有効にする必要があります。な" -"お、general_log を大量のデータを生成し、サーバの負荷を 15% 増加させますので、" -"注意するようにしてください。" +"phpMyAdmin モニタは、サーバ構成の最適化を支援し、時間のかかるクエリを追跡することができます。後者の場合には、テーブルに log_output " +"を設定し、slow_query_log または general_log のいずれかを有効にする必要があります。なお、general_log " +"を大量のデータを生成し、サーバの負荷を 15% 増加させますので、注意するようにしてください。" #: server_status.php:1371 msgid "" From 809aa8944153ffc70b0afca88f4c4e86b9ce6952 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Mon, 1 Aug 2011 12:53:19 +0200 Subject: [PATCH 10/67] Translation update done using Pootle. --- po/fr.po | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/po/fr.po b/po/fr.po index de205e4189..6999b2262c 100644 --- a/po/fr.po +++ b/po/fr.po @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 3.5.0-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2011-07-30 14:14-0400\n" -"PO-Revision-Date: 2011-08-01 12:42+0200\n" +"PO-Revision-Date: 2011-08-01 12:53+0200\n" "Last-Translator: Marc Delisle \n" "Language-Team: french \n" "Language: fr\n" @@ -10013,6 +10013,15 @@ msgid "" "will load statistics from the logs helping you find what caused the activity " "spike.

" msgstr "" +"Utilisation de la surveillance :
Vous êtes maintenant prêt! " +"Après avoir cliqué sur «Démarrer la surveillance», votre navigateur va " +"rafraîchir les graphiques à intervalle régulier. Vous pouvez ajouter des " +"graphiques et modifier le taux de rafraîchissement sous «Paramètres», ou " +"supprimer tout graphique via l'cône de rouage.

Lorsque vous constatez un " +"pic d'activité soudain, sélectionnez la portion de temps pertinent sur l'un " +"des graphiques en tenant enfoncé le bouton gauche de la souris et en vous " +"déplaçant sur le graphique. Ceci va charger les statistiques à partir des " +"journaux et vous aidera à trouver la cause du pic dans l'activité.

" #: server_status.php:1375 msgid "" From 7f8977747ea1e9c4b72af0e31e834698534306cf Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Mon, 1 Aug 2011 12:56:37 +0200 Subject: [PATCH 11/67] Translation update done using Pootle. --- po/fr.po | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/po/fr.po b/po/fr.po index 6999b2262c..b7488f0b56 100644 --- a/po/fr.po +++ b/po/fr.po @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 3.5.0-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2011-07-30 14:14-0400\n" -"PO-Revision-Date: 2011-08-01 12:53+0200\n" +"PO-Revision-Date: 2011-08-01 12:56+0200\n" "Last-Translator: Marc Delisle \n" "Language-Team: french \n" "Language: fr\n" @@ -10031,6 +10031,11 @@ msgid "" "disable the general_log and empty its table once monitoring is not required " "any more." msgstr "" +"À noter :Activer le journal general_log peut causer une augmentation " +"de charge de 5 à 15%. Également, la génération des statistiques à partir des " +"journaux est une tâche intensive, donc il est suggéré de ne sélectionner " +"qu'une petite portion de temps et de désactiver general_log puis de vider la " +"table correspondante lorsque la surveillance n'est plus requise." #: server_status.php:1385 msgid "CPU Usage" From dff4e25c552e360ccbbbf5f11cad1294916be029 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Mon, 1 Aug 2011 15:05:18 +0200 Subject: [PATCH 12/67] inline editing a SQL query doesn't work if it's too long Signed-off-by: Sven Strickroth --- libraries/common.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 61f5aa6936..d812262c0b 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -1182,7 +1182,7 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice', $is_view // in the tools div, only display the Inline link when not in ajax // mode because 1) it currently does not work and 2) we would // have two similar mechanisms on the page for the same goal - if ($is_select || $GLOBALS['is_ajax_request'] === false) { + if ($is_select || $GLOBALS['is_ajax_request'] === false && ! $query_too_big) { // see in js/functions.js the jQuery code attached to id inline_edit // document.write conflicts with jQuery, hence used $().append() echo "