From 7cecc2f23d5810292392a6ac958b1a5a48db90ef Mon Sep 17 00:00:00 2001 From: Spun Nakandala Date: Sat, 15 Jun 2013 14:50:31 +0530 Subject: [PATCH 01/14] code related to analyzing the sql query transferred to the sql analyzer --- libraries/parse_analyze.lib.php | 37 ++++++++++ libraries/sql.lib.php | 45 ------------ libraries/sqlparser.lib.php | 124 +++++++++++++++++++++++++++++++- sql.php | 15 ---- 4 files changed, 160 insertions(+), 61 deletions(-) diff --git a/libraries/parse_analyze.lib.php b/libraries/parse_analyze.lib.php index 3ad785d68d..d26d21579d 100644 --- a/libraries/parse_analyze.lib.php +++ b/libraries/parse_analyze.lib.php @@ -27,12 +27,49 @@ $analyzed_sql = PMA_SQP_analyze($parsed_sql); // PRIMARY KEY (`id`) // ) +// Fills some variables from the analysed SQL // A table has to be created, renamed, dropped -> navi frame should be reloaded $reload = isset($analyzed_sql[0]['queryflags']['reload']); // check for drop database $drop_database = isset($analyzed_sql[0]['queryflags']['drop_database']); +// for the presence of EXPLAIN +$is_explain = isset($analyzed_sql[0]['queryflags']['is_explain']); + +// for the presence of DELETE +$is_delete = isset($analyzed_sql[0]['queryflags']['is_delete']); + +// for the presence of UPDATE, DELETE or INSERT|LOAD DATA|REPLACE +$is_affected = isset($analyzed_sql[0]['queryflags']['is_affected']); + +// for the presence of REPLACE +$is_replace = isset($analyzed_sql[0]['queryflags']['is_replace']); + +// for the presence of INSERT +$is_insert = isset($analyzed_sql[0]['queryflags']['is_insert']); + +// for the presence of CHECK|ANALYZE|REPAIR|OPTIMIZE TABLE +$is_maint = isset($analyzed_sql[0]['queryflags']['is_maint']); + +// for the presence of SHOW +$is_show = isset($analyzed_sql[0]['queryflags']['is_show']); + +// for the presence of PRRCEDURE ANALYSE +$is_analyse = isset($analyzed_sql[0]['queryflags']['is_analyse']); + +// for the presence of INTO OUTFILE +$is_export = isset($analyzed_sql[0]['queryflags']['is_export']); + +// for the presence of GROUP BY|HAVING|SELECT DISTINCT +$is_group = isset($analyzed_sql[0]['queryflags']['is_group']); + +// for the presence of SUM|AVG|STD|STDDEV|MIN|MAX|BIT_OR|BIT_AND +$is_func = isset($analyzed_sql[0]['queryflags']['is_func']); + +// for the presence of SELECT COUNT +$is_count = isset($analyzed_sql[0]['queryflags']['is_count']); + // check for a real SELECT ... FROM $is_select = isset($analyzed_sql[0]['queryflags']['select_from']); diff --git a/libraries/sql.lib.php b/libraries/sql.lib.php index c0b4623bb3..bab74a250b 100644 --- a/libraries/sql.lib.php +++ b/libraries/sql.lib.php @@ -9,51 +9,6 @@ if (!defined('PHPMYADMIN')) { exit; } -/** - * Initialize some parameters needed to display results - * - * @param string $sql_query SQL statement - * @param boolean $is_select select query or not - * - * @return array set of parameters - * - * @access public - */ -function PMA_getDisplayPropertyParams($sql_query, $is_select) -{ - $is_explain = $is_count = $is_export = $is_delete = $is_insert = $is_affected = $is_show = $is_maint = $is_analyse = $is_group = $is_func = $is_replace = false; - - if ($is_select) { - $is_group = preg_match('@(GROUP[[:space:]]+BY|HAVING|SELECT[[:space:]]+DISTINCT)[[:space:]]+@i', $sql_query); - $is_func = ! $is_group && (preg_match('@[[:space:]]+(SUM|AVG|STD|STDDEV|MIN|MAX|BIT_OR|BIT_AND)\s*\(@i', $sql_query)); - $is_count = ! $is_group && (preg_match('@^SELECT[[:space:]]+COUNT\((.*\.+)?.*\)@i', $sql_query)); - $is_export = preg_match('@[[:space:]]+INTO[[:space:]]+OUTFILE[[:space:]]+@i', $sql_query); - $is_analyse = preg_match('@[[:space:]]+PROCEDURE[[:space:]]+ANALYSE@i', $sql_query); - } elseif (preg_match('@^EXPLAIN[[:space:]]+@i', $sql_query)) { - $is_explain = true; - } elseif (preg_match('@^DELETE[[:space:]]+@i', $sql_query)) { - $is_delete = true; - $is_affected = true; - } elseif (preg_match('@^(INSERT|LOAD[[:space:]]+DATA|REPLACE)[[:space:]]+@i', $sql_query)) { - $is_insert = true; - $is_affected = true; - if (preg_match('@^(REPLACE)[[:space:]]+@i', $sql_query)) { - $is_replace = true; - } - } elseif (preg_match('@^UPDATE[[:space:]]+@i', $sql_query)) { - $is_affected = true; - } elseif (preg_match('@^[[:space:]]*SHOW[[:space:]]+@i', $sql_query)) { - $is_show = true; - } elseif (preg_match('@^(CHECK|ANALYZE|REPAIR|OPTIMIZE)[[:space:]]+TABLE[[:space:]]+@i', $sql_query)) { - $is_maint = true; - } - - return array( - $is_group, $is_func, $is_count, $is_export, $is_analyse, $is_explain, - $is_delete, $is_affected, $is_insert, $is_replace,$is_show, $is_maint - ); -} - /** * Get the database name inside a USE query * diff --git a/libraries/sqlparser.lib.php b/libraries/sqlparser.lib.php index 3502c20812..64acf6a57d 100644 --- a/libraries/sqlparser.lib.php +++ b/libraries/sqlparser.lib.php @@ -982,6 +982,22 @@ function PMA_SQP_analyze($arr) * ['queryflags']['join'] = 1; for a JOIN * ['queryflags']['offset'] = 1; for the presence of OFFSET * ['queryflags']['procedure'] = 1; for the presence of PROCEDURE + * ['queryflags']['is_explain'] = 1; for the presence of EXPLAIN + * ['queryflags']['is_delete'] = 1; for the presence of DELETE + * ['queryflags']['is_affected'] = 1; for the presence of UPDATE, DELETE + * or INSERT|LOAD DATA|REPLACE + * ['queryflags']['is_replace'] = 1; for the presence of REPLACE + * ['queryflags']['is_insert'] = 1; for the presence of INSERT + * ['queryflags']['is_maint'] = 1; for the presence of CHECK|ANALYZE + * |REPAIR|OPTIMIZE TABLE + * ['queryflags']['is_show'] = 1; for the presence of SHOW + * ['queryflags']['is_analyse'] = 1; for the presence of PRRCEDURE ANALYSE + * ['queryflags']['is_export'] = 1; for the presence of INTO OUTFILE + * ['queryflags']['is_group'] = 1; for the presence of GROUP BY|HAVING| + * SELECT DISTINCT + * ['queryflags']['is_func'] = 1; for the presence of SUM|AVG|STD|STDDEV + * |MIN|MAX|BIT_OR|BIT_AND + * ['queryflags']['is_count'] = 1; for the presence of SELECT COUNT * * query clauses * ------------- @@ -1591,6 +1607,7 @@ function PMA_SQP_analyze($arr) $position_of_first_select = $i; } } else { + // for the presence of DROP DATABASE if ($first_reserved_word == 'DROP' && $upper_data == 'DATABASE') { $subresult['queryflags']['drop_database'] = 1; } @@ -1602,6 +1619,21 @@ function PMA_SQP_analyze($arr) ) { $subresult['queryflags']['reload'] = 1; } + + // for the presence of INSERT|LOAD DATA + if (in_array($first_reserved_word, array("INSERT", "LOAD")) + && $upper_data == 'REPLACE' + ) { + $subresult['queryflags']['is_insert'] = 1; + $subresult['queryflags']['is_affected'] = 1; + } + + // for the presence of CHECK|ANALYZE|REPAIR|OPTIMIZE TABLE + if (in_array($first_reserved_word, array("CHECK","ANALYZE","REPAIR","OPTIMIZE")) + && $upper_data == 'TABLE' + ) { + $subresult['queryflags']['is_maint'] = 1; + } } if ($upper_data == 'LIMIT' && ! $in_subquery) { @@ -1616,6 +1648,27 @@ function PMA_SQP_analyze($arr) $subresult['queryflags']['procedure'] = 1; $in_limit = false; $after_limit = true; + + // for the presnece of PROCEDURE ANALYSE + if (isset($subresult['queryflags']['select_from']) + && $subresult['queryflags']['select_from'] == 1 + && ($i + 1) < $size + && $arr[$i + 1]['type'] == 'alpha_reservedWord' + && strtoupper($arr[$i + 1]['data']) == 'ANALYSE' + ) { + $subresult['queryflags']['is_analyse'] = 1; + } + } + + // for the presnece of INTO OUTFILE + if ($upper_data == 'INTO' + && isset($subresult['queryflags']['select_from']) + && $subresult['queryflags']['select_from'] == 1 + && ($i + 1) < $size + && $arr[$i + 1]['type'] == 'alpha_reservedWord' + && strtoupper($arr[$i + 1]['data']) == 'OUTFILE' + ) { + $subresult['queryflags']['is_export'] = 1; } /** * @todo set also to false if we find FOR UPDATE or LOCK IN SHARE MODE @@ -1623,7 +1676,19 @@ function PMA_SQP_analyze($arr) if ($upper_data == 'SELECT') { $in_select_expr = true; $select_expr_clause = ''; + + // for the presence of SELECT COUNT + if (isset($subresult['queryflags']['select_from']) + && $subresult['queryflags']['select_from'] == 1 + && !isset($subresult['queryflags']['is_group']) + && ($i + 1) < $size + && $arr[$i + 1]['type'] == 'alpha_functionName' + && strtoupper($arr[$i + 1]['data']) == 'COUNT' + ) { + $subresult['queryflags']['is_count'] = 1; + } } + if ($upper_data == 'DISTINCT' && !$in_group_concat) { $subresult['queryflags']['distinct'] = 1; } @@ -1640,6 +1705,28 @@ function PMA_SQP_analyze($arr) $subresult['queryflags']['offset'] = 1; } + if ($upper_data == 'EXPLAIN') { + $subresult['queryflags']['is_explain'] = 1; + } + + if ($upper_data == 'DELETE') { + $subresult['queryflags']['is_delete'] = 1; + $subresult['queryflags']['is_affected'] = 1; + } + + if ($upper_data == 'UPDATE') { + $subresult['queryflags']['is_affected'] = 1; + } + + if ($upper_data == 'REPLACE') { + $subresult['queryflags']['is_replace'] = 1; + } + + if ($upper_data == 'SHOW') { + $subresult['queryflags']['is_show'] = 1; + } + + // if this is a real SELECT...FROM if ($upper_data == 'FROM' && isset($subresult['queryflags']['select_from']) @@ -1665,6 +1752,19 @@ function PMA_SQP_analyze($arr) $in_where = false; $in_select_expr = false; $in_from = false; + + // for the presence of GROUP BY|HAVING|SELECT DISTINCT + if (isset($subresult['queryflags']['select_from']) + && $subresult['queryflags']['select_from'] == 1 + && ($i + 1) < $size + && $arr[$i + 1]['type'] == 'alpha_reservedWord' + && in_array(strtoupper($arr[$i + 1]['data']), array("BY", "HAVING", "SELECT")) + && ($i + 2) < $size + && $arr[$i + 2]['type'] == 'alpha_reservedWord' + && strtoupper($arr[$i + 2]['data']) == 'DISTINCT' + ) { + $subresult['queryflags']['is_group'] = 1; + } } if ($upper_data == 'ORDER' && !$in_group_concat) { $seen_order = true; @@ -1733,7 +1833,6 @@ function PMA_SQP_analyze($arr) } // endif (reservedWord) - // do not add a space after a function name /** * @todo can we combine loop 2 and loop 1? some code is repeated here... @@ -1763,6 +1862,7 @@ function PMA_SQP_analyze($arr) } } + // do not add a space after an identifier if followed by a dot if ($arr[$i]['type'] == 'alpha_identifier' && $i < $size - 1 && $arr[$i + 1]['data'] == '.' @@ -1777,6 +1877,28 @@ function PMA_SQP_analyze($arr) $sep = ''; } + // for the presence of INSERT|LOAD DATA + if ($arr[$i]['type'] == 'alpha_identifier' + && strtoupper($arr[$i]['data']) == 'DATA' + && ($i - 1) >= 0 + && $arr[$i - 1]['type'] == 'alpha_reservedWord' + && in_array(strtoupper($arr[$i - 1]['data']), array("INSERT", "LOAD")) + ) { + $subresult['queryflags']['is_insert'] = 1; + $subresult['queryflags']['is_affected'] = 1; + } + + // for the presence of SUM|AVG|STD|STDDEV|MIN|MAX|BIT_OR|BIT_AND + if ($arr[$i]['type'] == 'alpha_functionName' + && in_array(strtoupper($arr[$i]['data']), array( + "SUM","AVG","STD","STDDEV","MIN","MAX","BIT_OR","BIT_AND")) + && isset($subresult['queryflags']['select_from']) + && $subresult['queryflags']['select_from'] == 1 + && !isset($subresult['queryflags']['is_group']) + ) { + $subresult['queryflags']['is_func'] = 1; + } + if ($in_select_expr && $upper_data != 'SELECT' && $upper_data != 'DISTINCT' ) { diff --git a/sql.php b/sql.php index 34025d8658..707b5c0a46 100644 --- a/sql.php +++ b/sql.php @@ -308,21 +308,6 @@ if (isset($_REQUEST['btnDrop']) && $_REQUEST['btnDrop'] == __('No')) { exit(); } // end if -// Defines some variables -// $is_group added for use in calculation of total number of rows. -// $is_count is changed for more correct "LIMIT" clause -// appending in queries like -// "SELECT COUNT(...) FROM ... GROUP BY ..." - -/** - * @todo detect all this with the parser, to avoid problems finding - * those strings in comments or backquoted identifiers - */ -list($is_group, $is_func, $is_count, $is_export, $is_analyse, $is_explain, - $is_delete, $is_affected, $is_insert, $is_replace, $is_show, $is_maint) - = PMA_getDisplayPropertyParams( - $sql_query, $is_select - ); // assign default full_sql_query $full_sql_query = $sql_query; From 00a33544994ae24bfd8c249e25853ab9f090db95 Mon Sep 17 00:00:00 2001 From: Spun Nakandala Date: Sat, 15 Jun 2013 20:55:56 +0530 Subject: [PATCH 02/14] changed to look the $first_reserved_word rather than any $upper_data --- libraries/sqlparser.lib.php | 39 +++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/libraries/sqlparser.lib.php b/libraries/sqlparser.lib.php index 64acf6a57d..eab6323f12 100644 --- a/libraries/sqlparser.lib.php +++ b/libraries/sqlparser.lib.php @@ -1603,9 +1603,27 @@ function PMA_SQP_analyze($arr) $subresult['querytype'] = $upper_data; $seen_reserved_word = true; - if ($first_reserved_word=='SELECT') { + if ($first_reserved_word == 'SELECT') { $position_of_first_select = $i; - } + } + + if ($first_reserved_word == 'EXPLAIN') { + $subresult['queryflags']['is_explain'] = 1; + } + + if ($first_reserved_word == 'DELETE') { + $subresult['queryflags']['is_delete'] = 1; + $subresult['queryflags']['is_affected'] = 1; + } + + if ($first_reserved_word == 'UPDATE') { + $subresult['queryflags']['is_affected'] = 1; + } + + if ($first_reserved_word == 'REPLACE') { + $subresult['queryflags']['is_replace'] = 1; + } + } else { // for the presence of DROP DATABASE if ($first_reserved_word == 'DROP' && $upper_data == 'DATABASE') { @@ -1705,23 +1723,6 @@ function PMA_SQP_analyze($arr) $subresult['queryflags']['offset'] = 1; } - if ($upper_data == 'EXPLAIN') { - $subresult['queryflags']['is_explain'] = 1; - } - - if ($upper_data == 'DELETE') { - $subresult['queryflags']['is_delete'] = 1; - $subresult['queryflags']['is_affected'] = 1; - } - - if ($upper_data == 'UPDATE') { - $subresult['queryflags']['is_affected'] = 1; - } - - if ($upper_data == 'REPLACE') { - $subresult['queryflags']['is_replace'] = 1; - } - if ($upper_data == 'SHOW') { $subresult['queryflags']['is_show'] = 1; } From c11d079fc9f614cbe086b7ed4a4f9e230b913344 Mon Sep 17 00:00:00 2001 From: Spun Nakandala Date: Sat, 15 Jun 2013 21:11:40 +0530 Subject: [PATCH 03/14] changed getTableHtmlForMultipleQueries() to use parse_analyze.lib.php --- libraries/sql.lib.php | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/libraries/sql.lib.php b/libraries/sql.lib.php index bab74a250b..56986eba83 100644 --- a/libraries/sql.lib.php +++ b/libraries/sql.lib.php @@ -117,25 +117,22 @@ function getTableHtmlForMultipleQueries( $databases_array ); } - $parsed_sql = PMA_SQP_parse($sql_data['valid_sql'][$sql_no]); + $table = PMA_getTableNameBySQL( $sql_data['valid_sql'][$sql_no], $tables_array ); - $analyzed_sql = PMA_SQP_analyze($parsed_sql); - $is_select = isset($analyzed_sql[0]['queryflags']['select_from']); + // for the use of the parse_analyze.lib.php + $sql_query = $sql_data['valid_sql'][$sql_no]; + + // Parse and analyze the query + require_once 'libraries/parse_analyze.lib.php'; + $unlim_num_rows = PMA_Table::countRecords($db, $table, true); $showtable = PMA_Table::sGetStatusInfo($db, $table, null, true); $url_query = PMA_generate_common_url($db, $table); - - list($is_group, $is_func, $is_count, $is_export, $is_analyse, - $is_explain, $is_delete, $is_affected, $is_insert, $is_replace, - $is_show, $is_maint) - = PMA_getDisplayPropertyParams( - $sql_data['valid_sql'][$sql_no], $is_select - ); - + // Handle remembered sorting order, only for single table query if ($GLOBALS['cfg']['RememberSorting'] && ! ($is_count || $is_export || $is_func || $is_analyse) From ac2dcec785fefa07c27187bcb978402b4f0e866b Mon Sep 17 00:00:00 2001 From: Spun Nakandala Date: Sat, 15 Jun 2013 22:04:32 +0530 Subject: [PATCH 04/14] changed such that $first_reserved_word is checked for the reserved word SHOW --- libraries/sqlparser.lib.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libraries/sqlparser.lib.php b/libraries/sqlparser.lib.php index eab6323f12..5184e17559 100644 --- a/libraries/sqlparser.lib.php +++ b/libraries/sqlparser.lib.php @@ -1624,6 +1624,10 @@ function PMA_SQP_analyze($arr) $subresult['queryflags']['is_replace'] = 1; } + if ($first_reserved_word == 'SHOW') { + $subresult['queryflags']['is_show'] = 1; + } + } else { // for the presence of DROP DATABASE if ($first_reserved_word == 'DROP' && $upper_data == 'DATABASE') { @@ -1723,11 +1727,6 @@ function PMA_SQP_analyze($arr) $subresult['queryflags']['offset'] = 1; } - if ($upper_data == 'SHOW') { - $subresult['queryflags']['is_show'] = 1; - } - - // if this is a real SELECT...FROM if ($upper_data == 'FROM' && isset($subresult['queryflags']['select_from']) From 9adbe80c48944a8d1b6c59f9c74c5a0087d8f53b Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 16 Jun 2013 06:42:02 -0400 Subject: [PATCH 05/14] Directly use the POST parameter --- db_create.php | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/db_create.php b/db_create.php index 3c80df9989..d9cea0ebb0 100644 --- a/db_create.php +++ b/db_create.php @@ -16,20 +16,6 @@ if (! PMA_DRIZZLE) { } require 'libraries/build_html_for_db.lib.php'; -/** - * Sets globals from $_POST - */ -$post_params = array( - 'new_db' -); -foreach ($post_params as $one_post_param) { - if (isset($_POST[$one_post_param])) { - $GLOBALS[$one_post_param] = $_POST[$one_post_param]; - } -} - -PMA_Util::checkParameters(array('new_db')); - /** * Defines the url to return to in case of error in a sql statement */ @@ -38,7 +24,7 @@ $err_url = 'index.php?' . PMA_generate_common_url(); /** * Builds and executes the db creation sql query */ -$sql_query = 'CREATE DATABASE ' . PMA_Util::backquote($new_db); +$sql_query = 'CREATE DATABASE ' . PMA_Util::backquote($_POST['new_db']); if (! empty($_POST['db_collation'])) { list($db_charset) = explode('_', $_POST['db_collation']); if (in_array($db_charset, $mysql_charsets) @@ -72,8 +58,8 @@ if (! $result) { } } else { $message = PMA_Message::success(__('Database %1$s has been created.')); - $message->addParam($new_db); - $GLOBALS['db'] = $new_db; + $message->addParam($_POST['new_db']); + $GLOBALS['db'] = $_POST['new_db']; /** * If in an Ajax request, build the output and send it @@ -89,11 +75,11 @@ if (! $result) { * @global array $GLOBALS['db_url_params'] * @name $db_url_params */ - $db_url_params['db'] = $new_db; + $db_url_params['db'] = $_POST['new_db']; $is_superuser = $GLOBALS['dbi']->isSuperuser(); $column_order = PMA_getColumnOrder(); - $url_query = PMA_generate_common_url($new_db); + $url_query = PMA_generate_common_url($_POST['new_db']); /** * String that will contain the output HTML @@ -108,7 +94,7 @@ if (! $result) { // $dbstats comes from the create table dialog if (! empty($dbstats)) { $current = array( - 'SCHEMA_NAME' => $new_db, + 'SCHEMA_NAME' => $_POST['new_db'], 'DEFAULT_COLLATION_NAME' => $db_collation_for_ajax, 'SCHEMA_TABLES' => '0', 'SCHEMA_TABLE_ROWS' => '0', @@ -120,7 +106,7 @@ if (! $result) { ); } else { $current = array( - 'SCHEMA_NAME' => $new_db + 'SCHEMA_NAME' => $_POST['new_db'] ); } From deb0c8d4e93203b78106361b8f68301fead2bb3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bilal=20=C4=86ati=C4=87?= Date: Sun, 16 Jun 2013 03:22:46 +0200 Subject: [PATCH 06/14] Translated using Weblate (Bosnian) Currently translated at 17.7% (472 of 2673) --- po/bs.po | 49 ++++++++++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 27 deletions(-) diff --git a/po/bs.po b/po/bs.po index dc91409d1b..7a21d8aa2e 100644 --- a/po/bs.po +++ b/po/bs.po @@ -4,17 +4,17 @@ msgstr "" "Project-Id-Version: phpMyAdmin 4.1-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2013-06-12 09:39+0200\n" -"PO-Revision-Date: 2013-04-05 12:08+0200\n" -"Last-Translator: Michal Čihař \n" -"Language-Team: Bosnian \n" +"PO-Revision-Date: 2013-06-16 03:22+0200\n" +"Last-Translator: Bilal Ćatić \n" +"Language-Team: Bosnian " +"\n" "Language: bs\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" -"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" -"X-Generator: Weblate 1.5-dev\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" +"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Weblate 1.6-dev\n" #: browse_foreigners.php:51 browse_foreigners.php:75 js/messages.php:335 #: libraries/DisplayResults.class.php:809 @@ -286,31 +286,28 @@ msgid "Unselect All" msgstr "ništa" #: db_operations.php:45 tbl_create.php:24 -#, fuzzy msgid "The database name is empty!" -msgstr "Ima tabele je prazno!" +msgstr "Naziv baze je prazan!" #: db_operations.php:129 -#, fuzzy, php-format +#, php-format msgid "Database %1$s has been renamed to %2$s" -msgstr "Tabeli %s promjenjeno ime u %s" +msgstr "Baza %1$s je preimenovana u %2$s" #: db_operations.php:133 -#, fuzzy, php-format +#, php-format msgid "Database %1$s has been copied to %2$s" -msgstr "Tabela %s je kopirana u %s." +msgstr "Baza %1$s je kopirana u %2$s" #: db_operations.php:261 -#, fuzzy, php-format +#, php-format #| msgid "" #| " additional features for working with linked tables have been ctivated. " #| "To find out why click %shere%s." msgid "" "The phpMyAdmin configuration storage has been deactivated. To find out why " "click %shere%s." -msgstr "" -"Dodatne mogućnosti za rad sa povezanim tabelama su isključene. Da biste " -"saznali zašto, kliknite %sovde%s." +msgstr "phpMyAdmin konfiguracijski spremnik je isključen. %sSaznaj više%s." #: db_printview.php:47 db_tracking.php:79 db_tracking.php:198 #: libraries/Menu.class.php:190 libraries/config/messages.inc.php:510 @@ -363,22 +360,23 @@ msgid "Last check:" msgstr "Posljednja provjera" #: db_printview.php:149 libraries/structure.lib.php:176 -#, fuzzy, php-format +#, php-format #| msgid "%s table(s)" msgid "%s table" msgid_plural "%s tables" msgstr[0] "%s tabela" msgstr[1] "%s tabela" +msgstr[2] "" #: db_qbe.php:40 msgid "You have to choose at least one column to display" msgstr "Morate izabrati bar jednu kolonu za prikaz" #: db_qbe.php:60 -#, fuzzy, php-format +#, php-format #| msgid "Switch to copied table" msgid "Switch to %svisual builder%s" -msgstr "Pređi na kopiranu tabelu" +msgstr "Pređi na %svizualni graditelj%s" #: db_search.php:30 libraries/plugins/auth/AuthenticationConfig.class.php:81 #: libraries/plugins/auth/AuthenticationConfig.class.php:96 @@ -389,10 +387,9 @@ msgid "Access denied" msgstr "Ulaz nije dozvoljen" #: db_structure.php:86 -#, fuzzy #| msgid "No tables found in database." msgid "No tables found in database" -msgstr "Tabele nisu pronađene u bazi." +msgstr "Nema pronađenih tabela u bazi" #: db_tracking.php:73 msgid "Tracked tables" @@ -415,9 +412,8 @@ msgid "Last version" msgstr "" #: db_tracking.php:81 tbl_tracking.php:765 -#, fuzzy msgid "Created" -msgstr "Napravi" +msgstr "Kreirano" #: db_tracking.php:82 tbl_tracking.php:766 msgid "Updated" @@ -463,9 +459,8 @@ msgid "not active" msgstr "" #: db_tracking.php:138 -#, fuzzy msgid "Versions" -msgstr "Operacije" +msgstr "Verzije" #: db_tracking.php:139 tbl_tracking.php:489 tbl_tracking.php:799 msgid "Tracking report" @@ -9528,7 +9523,7 @@ msgstr "Prikaži dimenzije tabele" #: libraries/schema/User_Schema.class.php:457 msgid "Display all tables with the same width" -msgstr "prikaz svih tabela iste širine?" +msgstr "Prikaži sve tabele u jednakoj širini" #: libraries/schema/User_Schema.class.php:460 libraries/structure.lib.php:379 msgid "Data Dictionary" From 178f83f9159dd0ff79464a35905023fe3d508097 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 16 Jun 2013 07:37:34 -0400 Subject: [PATCH 07/14] bug #3984 Cannot insert in this table (PHP < 5.4) --- ChangeLog | 1 + libraries/Util.class.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9330bc2726..0ea0a5a011 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ phpMyAdmin - ChangeLog 4.0.5.0 (not yet released) - bug #3977 Not detected configuration storage - bug #3970 Pressing enter in the filter field reloads page +- bug #3984 Cannot insert in this table (PHP < 5.4) 4.0.4.0 (not yet released) - bug #3959 Using DefaultTabDatabase in NavigationTree for Database Click diff --git a/libraries/Util.class.php b/libraries/Util.class.php index 3468776a44..0cc8684e9e 100644 --- a/libraries/Util.class.php +++ b/libraries/Util.class.php @@ -4031,7 +4031,7 @@ class PMA_Util if (! $escapeHtml) { foreach ($values as $key => $value) { - $values[$key] = html_entity_decode($value, ENT_QUOTES); + $values[$key] = html_entity_decode($value, ENT_QUOTES, 'UTF-8'); } } From c057952360f8b91fdf90edba0129984e42e175c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81d=C3=A1m=20Papp-Kuster?= Date: Sun, 16 Jun 2013 13:54:03 +0200 Subject: [PATCH 08/14] Translated using Weblate (Hungarian) Currently translated at 74.7% (1997 of 2673) --- po/hu.po | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/po/hu.po b/po/hu.po index 951da921d1..32bc7d0efa 100644 --- a/po/hu.po +++ b/po/hu.po @@ -4,16 +4,16 @@ msgstr "" "Project-Id-Version: phpMyAdmin 4.1-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2013-06-12 09:39+0200\n" -"PO-Revision-Date: 2013-04-03 09:47+0200\n" -"Last-Translator: Michal Čihař \n" -"Language-Team: Hungarian \n" +"PO-Revision-Date: 2013-06-16 13:54+0200\n" +"Last-Translator: Ádám Papp-Kuster \n" +"Language-Team: Hungarian " +"\n" "Language: hu\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 1.5-dev\n" +"X-Generator: Weblate 1.6-dev\n" #: browse_foreigners.php:51 browse_foreigners.php:75 js/messages.php:335 #: libraries/DisplayResults.class.php:809 @@ -902,7 +902,7 @@ msgstr "" "phpMyAdmin könyvtárában. Távolítsa el a phpMyAdmin beállítása után." #: index.php:489 -#, fuzzy, php-format +#, php-format #| msgid "" #| "ditional features for working with linked tables have been ctivated. To d " #| "out why click %shere%s." @@ -910,8 +910,9 @@ msgid "" "The phpMyAdmin configuration storage is not completely configured, some " "extended features have been deactivated. To find out why click %shere%s." msgstr "" -"A hivatkozott táblákkal történő munka kiegészítő funkciói inaktiválásra " -"kerültek. Ha szeretné megtudni, hogy miért, kattintson %side%s." +"A phpMyAdmin konfigurációs tárolója nincs megfelelően beállítva, néhány " +"kibővített funkció inaktiválásra került. Ha szeretné megtudni, hogy miért, " +"kattintson %side%s." #: index.php:521 #, php-format @@ -982,10 +983,10 @@ msgstr "Index szerkesztése" #: js/messages.php:44 libraries/display_indexes.lib.php:199 #: libraries/display_indexes.lib.php:205 -#, fuzzy, php-format +#, php-format #| msgid "Add %d column(s) to index" msgid "Add %s column(s) to index" -msgstr "%d oszlop hozzáadása az indexhez" +msgstr "%s oszlop hozzáadása az indexhez" #. l10n: Default label for the y-Axis of Charts #: js/messages.php:48 tbl_chart.php:236 @@ -1703,7 +1704,7 @@ msgstr "SQL-lekérdezési panelek elrejtése" #: js/messages.php:263 msgid "Show query box" -msgstr "Lekérdezési dobox megjelenítése" +msgstr "Lekérdezési doboz megjelenítése" #: js/messages.php:264 libraries/DisplayResults.class.php:3314 #: libraries/Index.class.php:591 libraries/Util.class.php:699 @@ -1813,10 +1814,9 @@ msgid "Point" msgstr "Pont" #: js/messages.php:304 -#, fuzzy #| msgid "Lines terminated by" msgid "Linestring" -msgstr "Sorok vége" +msgstr "Sorvég-karakter" #: js/messages.php:305 msgid "Polygon" @@ -6176,7 +6176,7 @@ msgstr "" #: libraries/config/messages.inc.php:480 libraries/sql_query_form.lib.php:373 msgid "Retain query box" -msgstr "Lekérdezési dobox megőrzése" +msgstr "Lekérdezési doboz megőrzése" #: libraries/config/messages.inc.php:481 msgid "Allow to display database and table statistics (eg. space usage)" From e3e16d181d13924c17a255b781cce1ca9aabe7be Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 16 Jun 2013 08:04:56 -0400 Subject: [PATCH 09/14] Code has to be executed for each iteration of the loop --- libraries/sql.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/sql.lib.php b/libraries/sql.lib.php index 56986eba83..8a9198219a 100644 --- a/libraries/sql.lib.php +++ b/libraries/sql.lib.php @@ -127,7 +127,7 @@ function getTableHtmlForMultipleQueries( $sql_query = $sql_data['valid_sql'][$sql_no]; // Parse and analyze the query - require_once 'libraries/parse_analyze.lib.php'; + require 'libraries/parse_analyze.lib.php'; $unlim_num_rows = PMA_Table::countRecords($db, $table, true); $showtable = PMA_Table::sGetStatusInfo($db, $table, null, true); From c4883127c7756018dcee296e822721c70a77f191 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 16 Jun 2013 08:08:07 -0400 Subject: [PATCH 10/14] This file should not end in .lib.php --- import.php | 2 +- libraries/{parse_analyze.lib.php => parse_analyze.inc.php} | 0 libraries/sql.lib.php | 4 ++-- sql.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename libraries/{parse_analyze.lib.php => parse_analyze.inc.php} (100%) diff --git a/import.php b/import.php index 3c98ea3486..50cdd7b17f 100644 --- a/import.php +++ b/import.php @@ -571,7 +571,7 @@ if (isset($message)) { // (but if the query is too large, in case of an imported file, the parser // can choke on it so avoid parsing) if (strlen($sql_query) <= $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']) { - include_once 'libraries/parse_analyze.lib.php'; + include_once 'libraries/parse_analyze.inc.php'; } // There was an error? diff --git a/libraries/parse_analyze.lib.php b/libraries/parse_analyze.inc.php similarity index 100% rename from libraries/parse_analyze.lib.php rename to libraries/parse_analyze.inc.php diff --git a/libraries/sql.lib.php b/libraries/sql.lib.php index 8a9198219a..56790fbdf7 100644 --- a/libraries/sql.lib.php +++ b/libraries/sql.lib.php @@ -123,11 +123,11 @@ function getTableHtmlForMultipleQueries( $tables_array ); - // for the use of the parse_analyze.lib.php + // for the use of the parse_analyze.inc.php $sql_query = $sql_data['valid_sql'][$sql_no]; // Parse and analyze the query - require 'libraries/parse_analyze.lib.php'; + require 'libraries/parse_analyze.inc.php'; $unlim_num_rows = PMA_Table::countRecords($db, $table, true); $showtable = PMA_Table::sGetStatusInfo($db, $table, null, true); diff --git a/sql.php b/sql.php index 707b5c0a46..1f0fda58b8 100644 --- a/sql.php +++ b/sql.php @@ -202,7 +202,7 @@ if (empty($sql_query) && strlen($table) && strlen($db)) { /** * Parse and analyze the query */ -require_once 'libraries/parse_analyze.lib.php'; +require_once 'libraries/parse_analyze.inc.php'; /** From b39aeb1f89120ff752c9dc3df486b0c3f441be61 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 16 Jun 2013 08:10:16 -0400 Subject: [PATCH 11/14] Remove author name --- export.php | 4 ++-- index.php | 4 ++-- libraries/parse_analyze.inc.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/export.php b/export.php index 4b0039db7f..297dad6d87 100644 --- a/export.php +++ b/export.php @@ -422,8 +422,8 @@ if ($onfly_compression) { } // Some of memory is needed for other thins and as treshold. - // Nijel: During export I had allocated (see memory_get_usage function) - // approx 1.2MB so this comes from that. + // During export I had allocated (see memory_get_usage function) + // approx 1.2MB so this comes from that. if ($memory_limit > 1500000) { $memory_limit -= 1500000; } diff --git a/index.php b/index.php index 2c3ec25f6b..07acc4a247 100644 --- a/index.php +++ b/index.php @@ -405,7 +405,7 @@ if ($server != 0 } /** - * Nijel: As we try to handle charsets by ourself, mbstring overloads just + * As we try to handle charsets by ourself, mbstring overloads just * break it, see bug 1063821. */ if (@extension_loaded('mbstring') && @ini_get('mbstring.func_overload') > 1) { @@ -420,7 +420,7 @@ if (@extension_loaded('mbstring') && @ini_get('mbstring.func_overload') > 1) { } /** - * Nijel: mbstring is used for handling multibyte inside parser, so it is good + * mbstring is used for handling multibyte inside parser, so it is good * to tell user something might be broken without it, see bug #1063149. */ if (! @extension_loaded('mbstring')) { diff --git a/libraries/parse_analyze.inc.php b/libraries/parse_analyze.inc.php index d26d21579d..78f58987dc 100644 --- a/libraries/parse_analyze.inc.php +++ b/libraries/parse_analyze.inc.php @@ -96,7 +96,7 @@ if ($is_select) { } else { $db = $prev_db; } - // Nijel: don't change reload, if we already decided to reload in import + // Don't change reload, if we already decided to reload in import if (empty($reload) && empty($GLOBALS['is_ajax_request'])) { $reload = ($db == $prev_db) ? 0 : 1; } From ffaa1d211669ad0aefce0a6f1cfa726548a4c141 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 16 Jun 2013 08:11:16 -0400 Subject: [PATCH 12/14] Fix typos --- export.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/export.php b/export.php index 297dad6d87..4838d01b94 100644 --- a/export.php +++ b/export.php @@ -421,7 +421,7 @@ if ($onfly_compression) { $memory_limit = (int)$memory_limit; } - // Some of memory is needed for other thins and as treshold. + // Some of memory is needed for other things and as threshold. // During export I had allocated (see memory_get_usage function) // approx 1.2MB so this comes from that. if ($memory_limit > 1500000) { From 32c8ac600f1e05d3401c31ff2435a85f9bc570f0 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 16 Jun 2013 08:12:17 -0400 Subject: [PATCH 13/14] Fix typo --- libraries/sql.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/sql.lib.php b/libraries/sql.lib.php index 56790fbdf7..6902588af8 100644 --- a/libraries/sql.lib.php +++ b/libraries/sql.lib.php @@ -91,7 +91,7 @@ function getTableHtmlForMultipleQueries( $querytime_before = array_sum(explode(' ', microtime())); // Assignment for variable is not needed since the results are - // looiping using the connection + // looping using the connection @$GLOBALS['dbi']->tryMultiQuery($multi_sql); $querytime_after = array_sum(explode(' ', microtime())); From e82d5505bed4e19a36315ca3e23e9dbfc1436671 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81d=C3=A1m=20Papp-Kuster?= Date: Sun, 16 Jun 2013 14:07:41 +0200 Subject: [PATCH 14/14] Translated using Weblate (Hungarian) Currently translated at 75.1% (2007 of 2673) --- po/hu.po | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/po/hu.po b/po/hu.po index 32bc7d0efa..039ea5b5d2 100644 --- a/po/hu.po +++ b/po/hu.po @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 4.1-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2013-06-12 09:39+0200\n" -"PO-Revision-Date: 2013-06-16 13:54+0200\n" +"PO-Revision-Date: 2013-06-16 14:07+0200\n" "Last-Translator: Ádám Papp-Kuster \n" "Language-Team: Hungarian " "\n" @@ -1052,10 +1052,9 @@ msgid "Connections / Processes" msgstr "Kapcsolatok / Folyamatok" #: js/messages.php:70 -#, fuzzy #| msgid "Cannot load or save configuration" msgid "Local monitor configuration incompatible" -msgstr "A beállítások nem tölthetők be vagy menthetők" +msgstr "A helyi megfigyelés beállításai nem kompatibilisek" #: js/messages.php:71 msgid "" @@ -1328,7 +1327,7 @@ msgstr "Diagramcím" #. l10n: As in differential values #: js/messages.php:144 msgid "Differential" -msgstr "" +msgstr "Megkülönböztető" #: js/messages.php:145 #, php-format @@ -1375,7 +1374,7 @@ msgstr "" #: js/messages.php:155 msgid "Log data loaded. Queries executed in this time span:" -msgstr "" +msgstr "A naplóadatok betöltve. Végrehajtott lekérdezések ebben az időszakban:" #: js/messages.php:157 msgid "Jump to Log table" @@ -1387,7 +1386,7 @@ msgstr "Nincs adat" #: js/messages.php:159 msgid "Log analysed, but no data found in this time span." -msgstr "" +msgstr "A napló megvizsgálva, de nincs adat az adott időszakban." #: js/messages.php:161 msgid "Analyzing…" @@ -1411,10 +1410,9 @@ msgid "Total time:" msgstr "Teljes idő:" #: js/messages.php:166 -#, fuzzy #| msgid "Profiling" msgid "Profiling results" -msgstr "Adatgyűjtés" +msgstr "Eredmények elemzése" #: js/messages.php:167 msgctxt "Display format" @@ -1467,7 +1465,7 @@ msgstr "Naplók betöltése" #: js/messages.php:182 msgid "Monitor refresh failed" -msgstr "" +msgstr "A megfigyelés frissítése sikertelen" #: js/messages.php:183 msgid "" @@ -1475,6 +1473,9 @@ msgid "" "This is most likely because your session expired. Reloading the page and " "reentering your credentials should help." msgstr "" +"Az új diagram adatainak lekérésekor a szerver érvénytelen választ adott. " +"Valószínűleg a munkamenet lejárt. Az oldal újratöltése, és a belépési adatok " +"újbóli megadása segíthet." #: js/messages.php:184 msgid "Reload page" @@ -1493,6 +1494,8 @@ msgstr "" msgid "" "Failed building chart grid with imported config. Resetting to default config…" msgstr "" +"A grafikon felépítése az importált beállításokkal sikertelen. Eredet " +"beállítások visszaállítása…" #: js/messages.php:190 libraries/Menu.class.php:288 #: libraries/Menu.class.php:371 libraries/Menu.class.php:482 @@ -1503,10 +1506,9 @@ msgid "Import" msgstr "Importálás" #: js/messages.php:191 -#, fuzzy #| msgid "Could not import configuration" msgid "Import monitor configuration" -msgstr "Nem importálhatók a beállítások" +msgstr "Megfigyelési beállítások importálása" #: js/messages.php:192 msgid "Please select the file you want to import" @@ -1571,7 +1573,7 @@ msgstr "Hiba a kérés feldolgozásában" #: js/messages.php:216 #, php-format msgid "Error code: %s" -msgstr "" +msgstr "Hibakód: %s" #: js/messages.php:217 #, php-format