From 9e432241d96f991855610805ed60de5366b27f87 Mon Sep 17 00:00:00 2001 From: Robert Antoni Buj Gelonch Date: Thu, 22 Feb 2018 22:37:56 +0000 Subject: [PATCH 1/8] Translated using Weblate (Catalan) Currently translated at 100.0% (3208 of 3208 strings) [CI skip] --- po/ca.po | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/po/ca.po b/po/ca.po index 68c25750b8..d564441b5c 100644 --- a/po/ca.po +++ b/po/ca.po @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 4.7.8-dev\n" "Report-Msgid-Bugs-To: translators@phpmyadmin.net\n" "POT-Creation-Date: 2018-02-12 16:30+0100\n" -"PO-Revision-Date: 2018-02-22 22:13+0000\n" +"PO-Revision-Date: 2018-02-22 22:39+0000\n" "Last-Translator: Robert Antoni Buj Gelonch \n" "Language-Team: Catalan " "\n" @@ -14577,7 +14577,7 @@ msgstr "primer" #: templates/table/structure/add_column.phtml:21 #, php-format msgid "after %s" -msgstr "Després de %s" +msgstr "després de %s" #: templates/columns_definitions/partitions.phtml:9 msgid "Partition by:" @@ -15593,7 +15593,7 @@ msgstr "" #: templates/table/search/selection_form.phtml:35 msgid "Do a \"query by example\" (wildcard: \"%\")" -msgstr "Fer una \"petició segons exemple\" (comodí: \"%\")" +msgstr "Fes una \"consulta amb l'exemple\" (comodí: \"%\")" #: templates/table/search/zoom_result_form.phtml:7 msgid "Browse/Edit the points" @@ -15670,12 +15670,12 @@ msgstr "Mida de l'índex" #: templates/table/structure/display_partitions.phtml:134 msgid "Partition table" -msgstr "Taula de partició" +msgstr "Taula de particions" #: templates/table/structure/display_partitions.phtml:137 #: templates/table/structure/partition_definition_form.phtml:7 msgid "Edit partitioning" -msgstr "Edita particionament" +msgstr "Edició de les particions" #: templates/table/structure/display_structure.phtml:129 view_create.php:206 msgid "Edit view" From cf1ad5c59f0990ac9199a9fdd232c0122b4aed4c Mon Sep 17 00:00:00 2001 From: Robert Antoni Buj Gelonch Date: Thu, 22 Feb 2018 22:41:21 +0000 Subject: [PATCH 2/8] Translated using Weblate (Catalan) Currently translated at 100.0% (3208 of 3208 strings) [CI skip] --- po/ca.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/po/ca.po b/po/ca.po index d564441b5c..d739c3256e 100644 --- a/po/ca.po +++ b/po/ca.po @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 4.7.8-dev\n" "Report-Msgid-Bugs-To: translators@phpmyadmin.net\n" "POT-Creation-Date: 2018-02-12 16:30+0100\n" -"PO-Revision-Date: 2018-02-22 22:39+0000\n" +"PO-Revision-Date: 2018-02-23 23:34+0000\n" "Last-Translator: Robert Antoni Buj Gelonch \n" "Language-Team: Catalan " "\n" @@ -15539,7 +15539,7 @@ msgstr "Seleccioneu les columnes (una com a mínim):" #: templates/table/search/options.phtml:37 msgid "Add search conditions (body of the \"where\" clause):" -msgstr "Afegeix les condicions de la cerca (cos de la clàusula \"where\"):" +msgstr "Afegiu les condicions de la cerca (cos de la clàusula \"where\"):" #: templates/table/search/options.phtml:45 msgid "Number of rows per page" From b34301220d10a6dbeea5c8e9864689acff90b3f0 Mon Sep 17 00:00:00 2001 From: Aki Kettunen Date: Mon, 26 Feb 2018 08:53:37 +0000 Subject: [PATCH 3/8] Translated using Weblate (Finnish) Currently translated at 69.0% (2216 of 3208 strings) [CI skip] --- po/fi.po | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/po/fi.po b/po/fi.po index 56adc79a59..8032adb65d 100644 --- a/po/fi.po +++ b/po/fi.po @@ -4,16 +4,16 @@ msgstr "" "Project-Id-Version: phpMyAdmin 4.7.8-dev\n" "Report-Msgid-Bugs-To: translators@phpmyadmin.net\n" "POT-Creation-Date: 2018-02-12 16:30+0100\n" -"PO-Revision-Date: 2017-10-29 04:45+0000\n" -"Last-Translator: Pyscowicz \n" -"Language-Team: Finnish \n" +"PO-Revision-Date: 2018-02-27 09:37+0000\n" +"Last-Translator: Aki Kettunen \n" +"Language-Team: Finnish " +"\n" "Language: fi\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 2.17\n" +"X-Generator: Weblate 2.20-dev\n" #: ajax.php:16 ajax.php:33 export.php:192 schema_export.php:64 msgid "Bad type!" @@ -1728,6 +1728,8 @@ msgid "" "It seems that the connection to server has been lost. Please check your " "network connectivity and server status." msgstr "" +"Yhteys palvelimeen näyttäisi katkenneen. Tarkasta verkkoyhteytesi ja " +"palvelimen tila," #: js/messages.php:372 #: libraries/controllers/server/ServerDatabasesController.php:194 @@ -8288,6 +8290,8 @@ msgid "" "You are using the mysql extension which is deprecated in phpMyAdmin. Please " "consider installing the mysqli extension." msgstr "" +"Käytät mysql-laajennusta, jonka tuki on päättymässä phpMyAdminissa. Harkitse " +"siirtymistä käyttämään mysqli-laajennusta." #: libraries/db_designer.lib.php:119 #, fuzzy @@ -8297,7 +8301,7 @@ msgstr "Tuontiin tarvittavaa lisäosaa ei voida tuoda, tarkista asetukset!" #: libraries/dbi/DBIMysqli.php:160 msgid "SSL connection enforced by server, automatically enabling it." -msgstr "" +msgstr "Palvelin vaatii SSL-yhteyden, ja se on otettu automaattisesti käyttöön." #: libraries/display_change_password.lib.php:57 #: libraries/replication_gui.lib.php:854 @@ -8314,7 +8318,7 @@ msgstr "Salasana:" #: libraries/display_change_password.lib.php:68 msgid "Enter:" -msgstr "" +msgstr "Syötä:" #: libraries/display_change_password.lib.php:75 #: libraries/replication_gui.lib.php:865 From 13e7973c4fd90d7b8e7adb82cca3a508ce2b2e9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Krukowski?= Date: Mon, 26 Feb 2018 15:11:37 +0000 Subject: [PATCH 4/8] Translated using Weblate (Polish) Currently translated at 98.6% (3166 of 3208 strings) [CI skip] --- po/pl.po | 74 ++++++++++++++++++++------------------------------------ 1 file changed, 26 insertions(+), 48 deletions(-) diff --git a/po/pl.po b/po/pl.po index 038b0a680a..9766481f22 100644 --- a/po/pl.po +++ b/po/pl.po @@ -3,17 +3,17 @@ msgstr "" "Project-Id-Version: phpMyAdmin 4.7.8-dev\n" "Report-Msgid-Bugs-To: translators@phpmyadmin.net\n" "POT-Creation-Date: 2018-02-12 16:30+0100\n" -"PO-Revision-Date: 2018-02-12 15:28+0000\n" -"Last-Translator: Michal Čihař \n" -"Language-Team: Polish \n" +"PO-Revision-Date: 2018-02-27 15:38+0000\n" +"Last-Translator: Stanisław Krukowski \n" +"Language-Team: Polish " +"\n" "Language: pl\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==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2;\n" -"X-Generator: Weblate 2.19-dev\n" +"X-Generator: Weblate 2.20-dev\n" #: ajax.php:16 ajax.php:33 export.php:192 schema_export.php:64 msgid "Bad type!" @@ -5401,13 +5401,7 @@ msgid "Key should contain letters, numbers [em]and[/em] special characters." msgstr "Klucz powinien zawierać litery, cyfry [em]i[/em] znaki specjalne." #: libraries/config/ServerConfigChecks.php:384 -#, fuzzy, php-format -#| msgid "" -#| "This %soption%s should be disabled as it allows attackers to bruteforce " -#| "login to any MySQL server. If you feel this is necessary, use %strusted " -#| "proxies list%s. However, IP-based protection may not be reliable if your " -#| "IP belongs to an ISP where thousands of users, including you, are " -#| "connected to." +#, php-format msgid "" "This %soption%s should be disabled as it allows attackers to bruteforce " "login to any MySQL server. If you feel this is necessary, use %srestrict " @@ -5415,11 +5409,12 @@ msgid "" "protection with trusted proxies list may not be reliable if your IP belongs " "to an ISP where thousands of users, including you, are connected to." msgstr "" -"Ta %sopcion%s powinna być wyłączona, ponieważ umożliwia atakującemu na " -"zalogowanie bruteforce do dowolnego serwera MySQL. Jeśli uważasz, że jest to " -"konieczne, należy użyć %strusted proxies list%s. Jednak ochrona oparta na " -"protokole IP mogą nie być wiarygodne, jeśli Twój adres IP należy do ISP, w " -"którym tysiące użytkowników, w tym Ty, są podłączone." +"Ta %s opcja %s powinna być wyłączona, ponieważ umożliwia atakującemu " +"zalogowanie się do dowolnego serwera MySQL metodą bruteforce. Jeśli uważasz, " +"że jest to konieczne, należy użyć %ogranicz login do serwera MySQL%s lub do %" +"s listy zaufanych serwerów proxy%s. Jednak ochrona oparta na protokole IP " +"może być niewiarygodna, jeśli twój adres IP, za pomocą którego jest " +"podłączonych wielu użytkowników (w tym również i ty), należy do ISP." #: libraries/config/ServerConfigChecks.php:404 msgid "" @@ -5478,35 +5473,27 @@ msgstr "" "bezpieczeństwa, takich jak personifikacji." #: libraries/config/ServerConfigChecks.php:463 -#, fuzzy, php-format -#| msgid "" -#| "If using cookie authentication and %sLogin cookie store%s is not 0, " -#| "%sLogin cookie validity%s must be set to a value less or equal to it." +#, php-format msgid "" "If using [kbd]cookie[/kbd] authentication and %sLogin cookie store%s is not " "0, %sLogin cookie validity%s must be set to a value less or equal to it." msgstr "" -"W przypadku korzystania z uwierzytelniania [kbd]cookie[/kbd] i " -"%Przechowalnia sciasteczek logowania%s nie jest 0, %sWażności plików cookie" -"%s musi być ustawiona na wartość mniejsza lub równą jej." +"Jeśli używane uwierzytelnienie [kbd]cookie[/kbd] i %sLogin cookie store%s " +"nie wynosi 0, musi być ustawiona wartość mniejsza lub jemu równa %sLogin " +"cookie validity%s." #: libraries/config/ServerConfigChecks.php:477 -#, fuzzy, php-format -#| msgid "" -#| "If you feel this is necessary, use additional protection settings - " -#| "%shost authentication%s settings and %strusted proxies list%s. However, " -#| "IP-based protection may not be reliable if your IP belongs to an ISP " -#| "where thousands of users, including you, are connected to." +#, php-format msgid "" "If you feel this is necessary, use additional protection settings - %shost " "authentication%s settings and %strusted proxies list%s. However, IP-based " "protection may not be reliable if your IP belongs to an ISP where thousands " "of users, including you, are connected to." msgstr "" -"Jeśli uważasz, że jest to konieczne, należy stosować dodatkowe ustawienia " -"ochrony - ustawienia %suwierzytelniania hosta%s i %slisty zaufanych%s " -"serwerów proxy. Jednak ochrona IP może nie być wiarygodna, czy IP należy do " -"ISP, w którym tysiące użytkowników, łącznie z Tobą, są podłączeni." +"Jeśli uważasz, że jest to konieczne, uzyj dodatkowych ustawień ochrony - " +"ustawienia %suwierzytelniania hosta%s i %slisty zaufanych serwerów proxy%s. " +"Jednak ochrona IP może nie być wiarygodna, jesli IP należy do ISP, do " +"którego jest podłączonych tysiące użytkowników, łącznie z tobą." #: libraries/config/ServerConfigChecks.php:492 #, php-format @@ -5619,19 +5606,14 @@ msgid "Restrict login to MySQL server" msgstr "Ogranicz logowanie do serwera MySQL" #: libraries/config/messages.inc.php:28 -#, fuzzy -#| msgid "" -#| "Enabling this allows a page located on a different domain to call " -#| "phpMyAdmin inside a frame, and is a potential [strong]security hole[/" -#| "strong] allowing cross-frame scripting attacks" msgid "" "Enabling this allows a page located on a different domain to call phpMyAdmin " "inside a frame, and is a potential [strong]security hole[/strong] allowing " "cross-frame scripting (XSS) attacks." msgstr "" -"Włączenie umożliwia stronie zlokalizowanej na innej domenie, połączyć się z " -"wewnątrznymi ramkami phpMyAdmin, i jest potencjalną [strong] luką " -"bezpieczeństwa [/strong] pozwalającą na ataki skryptem na ramki" +"Włączenie tego umożliwia stronie zlokalizowanej w innej domenie wywołanie " +"phpMyAdmin wewnątrz ramki i jest potencjalną [strong] luką bezpieczeństwa " +"[/strong], pozwalającą na ataki typu cross-frame scripting (XSS)." #: libraries/config/messages.inc.php:32 msgid "Allow third party framing" @@ -6939,16 +6921,12 @@ msgid "GZip output buffering" msgstr "Kompresja wyjścia GZip" #: libraries/config/messages.inc.php:557 -#, fuzzy -#| msgid "" -#| "[kbd]SMART[/kbd] - i.e. descending order for columns of type TIME, DATE, " -#| "DATETIME and TIMESTAMP, ascending order otherwise" msgid "" "[kbd]SMART[/kbd] - i.e. descending order for columns of type TIME, DATE, " "DATETIME and TIMESTAMP, ascending order otherwise." msgstr "" -"[kbd]SMART[/kbd] - tj. malejącej dla kolumny, wpisz DATE, DATETIME i " -"TIMESTAMP, a rosnącej inaczej" +"[kbd]SMART[/kbd] - tj. porządek malejący dla kolumn TIME, DATE, DATETIME and " +"TIMESTAMP, w innym przypadku - porzadek rosnący." #: libraries/config/messages.inc.php:560 msgid "Default sorting order" From 0889b52c36c2800b240efaaa5cb003d16a5dc10c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?= Date: Mon, 26 Feb 2018 22:26:13 -0300 Subject: [PATCH 5/8] Replace static methods with instance methods MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace PhpMyAdmin\Sql static methods with instance methods. Signed-off-by: Maurício Meneghini Fauth --- db_qbe.php | 3 +- import.php | 10 +- .../Table/TableSearchController.php | 3 +- .../Table/TableStructureController.php | 3 +- .../classes/Database/MultiTableQuery.php | 3 +- libraries/classes/Display/Results.php | 4 +- libraries/classes/MultSubmits.php | 3 +- libraries/classes/Sql.php | 284 +++++++++--------- libraries/mult_submits.inc.php | 3 +- sql.php | 20 +- tbl_row_action.php | 3 +- test/classes/SqlTest.php | 155 ++++++---- 12 files changed, 272 insertions(+), 222 deletions(-) diff --git a/db_qbe.php b/db_qbe.php index d49d01cd72..df143faaaf 100644 --- a/db_qbe.php +++ b/db_qbe.php @@ -85,7 +85,8 @@ if (isset($_REQUEST['submit_sql']) && ! empty($sql_query)) { $message_to_display = true; } else { $goto = 'db_sql.php'; - Sql::executeQueryAndSendQueryResponse( + $sql = new Sql(); + $sql->executeQueryAndSendQueryResponse( null, // analyzed_sql_results false, // is_gotofile $_REQUEST['db'], // db diff --git a/import.php b/import.php index f83d03e295..958b60673b 100644 --- a/import.php +++ b/import.php @@ -41,6 +41,8 @@ if (isset($_REQUEST['simulate_dml'])) { $response = Response::getInstance(); +$sql = new Sql(); + // If it's a refresh console bookmarks request if (isset($_REQUEST['console_bookmark_refresh'])) { $response->addJSON( @@ -697,7 +699,7 @@ if ($go_sql) { extract($analyzed_sql_results); // Check if User is allowed to issue a 'DROP DATABASE' Statement - if (Sql::hasNoRightsToDropDatabase( + if ($sql->hasNoRightsToDropDatabase( $analyzed_sql_results, $cfg['AllowUserDropDatabase'], $GLOBALS['dbi']->isSuperuser() )) { PhpMyAdmin\Util::mysqlDie( @@ -713,7 +715,7 @@ if ($go_sql) { $table = $table_from_sql; } - $html_output .= Sql::executeQueryAndGetQueryResponse( + $html_output .= $sql->executeQueryAndGetQueryResponse( $analyzed_sql_results, // analyzed_sql_results false, // is_gotofile $db, // db @@ -740,7 +742,7 @@ if ($go_sql) { // the SQL tab if (! empty($_POST['bkm_label']) && ! empty($import_text)) { $cfgBookmark = Bookmark::getParams($GLOBALS['cfg']['Server']['user']); - Sql::storeTheQueryAsBookmark( + $sql->storeTheQueryAsBookmark( $db, $cfgBookmark['user'], $_POST['sql_query'], $_POST['bkm_label'], isset($_POST['bkm_replace']) ? $_POST['bkm_replace'] : null @@ -755,7 +757,7 @@ if ($go_sql) { // Save a Bookmark with more than one queries (if Bookmark label given). if (! empty($_POST['bkm_label']) && ! empty($import_text)) { $cfgBookmark = Bookmark::getParams($GLOBALS['cfg']['Server']['user']); - Sql::storeTheQueryAsBookmark( + $sql->storeTheQueryAsBookmark( $db, $cfgBookmark['user'], $_POST['sql_query'], $_POST['bkm_label'], isset($_POST['bkm_replace']) ? $_POST['bkm_replace'] : null diff --git a/libraries/classes/Controllers/Table/TableSearchController.php b/libraries/classes/Controllers/Table/TableSearchController.php index 51567b678c..c1f8e3be72 100644 --- a/libraries/classes/Controllers/Table/TableSearchController.php +++ b/libraries/classes/Controllers/Table/TableSearchController.php @@ -455,7 +455,8 @@ class TableSearchController extends TableController */ $db = $this->db; - Sql::executeQueryAndSendQueryResponse( + $sql = new Sql(); + $sql->executeQueryAndSendQueryResponse( null, // analyzed_sql_results false, // is_gotofile $this->db, // db diff --git a/libraries/classes/Controllers/Table/TableStructureController.php b/libraries/classes/Controllers/Table/TableStructureController.php index 3db699d808..a6516e194e 100644 --- a/libraries/classes/Controllers/Table/TableStructureController.php +++ b/libraries/classes/Controllers/Table/TableStructureController.php @@ -820,8 +820,9 @@ class TableStructureController extends TableController // @todo: possibly refactor extract($analyzed_sql_results); + $sql = new Sql(); $this->response->addHTML( - Sql::executeQueryAndGetQueryResponse( + $sql->executeQueryAndGetQueryResponse( isset($analyzed_sql_results) ? $analyzed_sql_results : '', false, // is_gotofile $this->db, // db diff --git a/libraries/classes/Database/MultiTableQuery.php b/libraries/classes/Database/MultiTableQuery.php index d2f23d9dd6..a1b1f745db 100644 --- a/libraries/classes/Database/MultiTableQuery.php +++ b/libraries/classes/Database/MultiTableQuery.php @@ -110,7 +110,8 @@ class MultiTableQuery extract($analyzedSqlResults); $goto = 'db_multi_table_query.php'; - Sql::executeQueryAndSendQueryResponse( + $sql = new Sql(); + $sql->executeQueryAndSendQueryResponse( null, // analyzed_sql_results false, // is_gotofile $db, // db diff --git a/libraries/classes/Display/Results.php b/libraries/classes/Display/Results.php index c2dd2f05e7..c386670403 100644 --- a/libraries/classes/Display/Results.php +++ b/libraries/classes/Display/Results.php @@ -1406,7 +1406,6 @@ class Results . Url::getHiddenInputs( $this->__get('db'), $this->__get('table') ) - // to avoid calling Sql::handleSortOrder() later . Url::getHiddenFields(array('sort_by_key' => '1')) . __('Sort by key') . ': ' . $dropdown . ''; return $dropdown; } @@ -432,7 +432,7 @@ EOT; * * @return string with value */ - public static function getFullValuesForSetColumn($db, $table, $column, $where_clause) + private function getFullValuesForSetColumn($db, $table, $column, $where_clause) { $result = $GLOBALS['dbi']->fetchSingleRow( "SELECT `$column` FROM `$db`.`$table` WHERE $where_clause" @@ -453,9 +453,9 @@ EOT; * * @return string $dropdown html for the set column */ - public static function getHtmlForSetColumn($db, $table, $column, $curr_value) + private function getHtmlForSetColumn($db, $table, $column, $curr_value) { - $values = self::getValuesForColumn($db, $table, $column); + $values = $this->getValuesForColumn($db, $table, $column); $dropdown = ''; $full_values = isset($_REQUEST['get_full_values']) ? $_REQUEST['get_full_values'] : false; @@ -465,7 +465,7 @@ EOT; // If the $curr_value was truncated, we should // fetch the correct full values from the table if ($full_values && ! empty($where_clause)) { - $curr_value = self::getFullValuesForSetColumn( + $curr_value = $this->getFullValuesForSetColumn( $db, $table, $column, $where_clause ); } @@ -477,7 +477,7 @@ EOT; $selected_values = explode(',', $converted_curr_value); - $dropdown .= self::getHtmlForOptionsList($values, $selected_values); + $dropdown .= $this->getHtmlForOptionsList($values, $selected_values); $select_size = (sizeof($values) > 10) ? 10 : sizeof($values); $dropdown = '