From 2334d6bcca0a77414108d1203a6247fa4d5d9060 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Sat, 29 Oct 2022 18:18:06 +0000 Subject: [PATCH 1/7] Translated using Weblate (French) Currently translated at 100.0% (3418 of 3418 strings) [ci skip] Translation: phpMyAdmin/5.2 Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/fr/ Signed-off-by: William Desportes --- po/fr.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/po/fr.po b/po/fr.po index d50b5300b6..2be87ba948 100644 --- a/po/fr.po +++ b/po/fr.po @@ -4,8 +4,8 @@ msgstr "" "Project-Id-Version: phpMyAdmin-docs 4.0.0-dev\n" "Report-Msgid-Bugs-To: translators@phpmyadmin.net\n" "POT-Creation-Date: 2022-09-29 00:17-0300\n" -"PO-Revision-Date: 2022-10-17 07:59+0000\n" -"Last-Translator: Olivier Humbert \n" +"PO-Revision-Date: 2022-10-29 18:19+0000\n" +"Last-Translator: William Desportes \n" "Language-Team: French \n" "Language: fr\n" @@ -13,7 +13,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.15-dev\n" +"X-Generator: Weblate 4.14.2-dev\n" #: libraries/advisory_rules_generic.php:9 msgid "Uptime below one day" @@ -6480,7 +6480,7 @@ msgstr "Importer la configuration de surveillance" #: libraries/classes/Controllers/JavaScriptMessagesController.php:312 msgid "Please select the file you want to import:" -msgstr "Merci de choisir le fichier à importer:" +msgstr "Merci de choisir le fichier à importer :" #: libraries/classes/Controllers/JavaScriptMessagesController.php:313 msgid "Please enter a valid table name." From ce628397ab8e9b041fbc57b95e70583905be891f Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Sat, 29 Oct 2022 23:41:53 +0100 Subject: [PATCH 2/7] Update Core.php Signed-off-by: Kamil Tekiela --- libraries/classes/Core.php | 23 ++++------------------- test/classes/CoreTest.php | 2 +- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/libraries/classes/Core.php b/libraries/classes/Core.php index 81990aa0a1..e25ad1f2b7 100644 --- a/libraries/classes/Core.php +++ b/libraries/classes/Core.php @@ -42,7 +42,6 @@ use function preg_match; use function preg_replace; use function session_write_close; use function sprintf; -use function str_contains; use function str_replace; use function strlen; use function strpos; @@ -488,24 +487,10 @@ class Core $headers['Content-Type'] = $mimetype; - /** @var string $browserAgent */ - $browserAgent = $GLOBALS['config']->get('PMA_USR_BROWSER_AGENT'); - - // inform the server that compression has been done, - // to avoid a double compression (for example with Apache + mod_deflate) - if (str_contains($mimetype, 'gzip')) { - /** - * @see https://github.com/phpmyadmin/phpmyadmin/issues/11283 - */ - if ($browserAgent !== 'CHROME') { - $headers['Content-Encoding'] = 'gzip'; - } - } else { - // The default output in PMA uses gzip, - // so if we want to output uncompressed file, we should reset the encoding. - // See PHP bug https://github.com/php/php-src/issues/8218 - header_remove('Content-Encoding'); - } + // The default output in PMA uses gzip, + // so if we want to output uncompressed file, we should reset the encoding. + // See PHP bug https://github.com/php/php-src/issues/8218 + header_remove('Content-Encoding'); $headers['Content-Transfer-Encoding'] = 'binary'; diff --git a/test/classes/CoreTest.php b/test/classes/CoreTest.php index e7cb514874..6d0e94c931 100644 --- a/test/classes/CoreTest.php +++ b/test/classes/CoreTest.php @@ -1046,7 +1046,7 @@ class CoreTest extends AbstractNetworkTestCase $this->assertContains('Content-Description: File Transfer', $headersList); $this->assertContains('Content-Disposition: attachment; filename="test.sql.gz"', $headersList); $this->assertContains('Content-Type: application/x-gzip', $headersList); - $this->assertContains('Content-Encoding: gzip', $headersList); + $this->assertNotContains('Content-Encoding: gzip', $headersList); $this->assertContains('Content-Transfer-Encoding: binary', $headersList); $this->assertNotContains('Content-Length: 0', $headersList); } From 32de166f03914943d534f341219b4c3e7b2030b3 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Mon, 31 Oct 2022 12:42:37 +0100 Subject: [PATCH 3/7] Fix #17812 - Add missing close button style on pick from central column modal on table structure Fixes: #17812 Signed-off-by: William Desportes --- js/src/functions.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/src/functions.js b/js/src/functions.js index 58f98397e2..5a8447cc22 100644 --- a/js/src/functions.js +++ b/js/src/functions.js @@ -3241,6 +3241,9 @@ AJAX.registerOnload('functions.js', function () { } var buttonOptions = {}; var $centralColumnsDialog = $(centralColumnsDialog).dialog({ + classes: { + 'ui-dialog-titlebar-close': 'btn-close' + }, minWidth: width, maxHeight: 450, modal: true, From 455016557ef91ac02046375b37981dcf09a1d7e3 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Mon, 31 Oct 2022 13:38:07 +0100 Subject: [PATCH 4/7] Ref #17028 - Add test cases for queries Signed-off-by: William Desportes --- test/classes/SqlTest.php | 41 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/test/classes/SqlTest.php b/test/classes/SqlTest.php index 4fc9be9328..70e2d45edf 100644 --- a/test/classes/SqlTest.php +++ b/test/classes/SqlTest.php @@ -361,6 +361,34 @@ class SqlTest extends AbstractTestCase // result // just browsing return [ + 'join on SELECT results with *' => [ + // -- Showing rows 0 - 49 (164056 total, 0 in query, Query took 0.1498 seconds.) + 'select * from game_auth_logs l join (' + . ' select al.user_id, max(al.id) as id from game_auth_logs al ' + . 'where al.successfull = 1 group by al.user_id ) last_log on last_log.id = l.id;', + ['max_rows' => 50, 'pos' => 0], + 164056, + 50, + false, + 'SELECT COUNT(*) FROM (select * from game_auth_logs l join (' + . ' select al.user_id, max(al.id) as id from game_auth_logs al ' + . 'where al.successfull = 1 group by al.user_id ) last_log on last_log.id = l.id' + . ' ) as cnt', + ], + 'join on SELECT results with alias.*' => [ + // -- Showing rows 0 - 24 (267 total, Query took 0.1533 seconds.) + 'select l.* from game_auth_logs l join (' + . ' select al.user_id, max(al.id) as id from game_auth_logs al ' + . 'where al.successfull = 1 group by al.user_id ) last_log on last_log.id = l.id;', + ['max_rows' => 50, 'pos' => 0], + 164056, + 50, + false, + 'SELECT COUNT(*) FROM (select l.* from game_auth_logs l join (' + . ' select al.user_id, max(al.id) as id from game_auth_logs al ' + . 'where al.successfull = 1 group by al.user_id ) last_log on last_log.id = l.id' + . ' ) as cnt', + ], [ 'SELECT * FROM company_users WHERE id != 0 LIMIT 0, 10', ['max_rows' => 250], @@ -545,7 +573,8 @@ class SqlTest extends AbstractTestCase array $sessionTmpVal, int $numRows, int $expectedNumRows, - bool $justBrowsing = false + bool $justBrowsing = false, + ?string $expectedCountQuery = null ): void { if ($justBrowsing) { $GLOBALS['cfg']['Server']['DisableIS'] = true; @@ -555,6 +584,15 @@ class SqlTest extends AbstractTestCase $analyzed_sql_results = $sqlQuery === null ? [] : $this->parseAndAnalyze($sqlQuery); + if ($expectedCountQuery !== null) { + $this->dummyDbi->addResult( + $expectedCountQuery, + [[$expectedNumRows]], + [], + [] + ); + } + $result = $this->callFunction( $this->sql, Sql::class, @@ -568,6 +606,7 @@ class SqlTest extends AbstractTestCase ] ); $this->assertSame($expectedNumRows, $result); + $this->assertAllQueriesConsumed(); } public function testExecuteQueryAndSendQueryResponse(): void From e51e3fa71f05e240ca017548463a2d37471ea88a Mon Sep 17 00:00:00 2001 From: William Desportes Date: Mon, 31 Oct 2022 14:54:38 +0100 Subject: [PATCH 5/7] Fix typo in test data [ci skip] Signed-off-by: William Desportes --- test/classes/SqlTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/classes/SqlTest.php b/test/classes/SqlTest.php index 70e2d45edf..685d7e27ff 100644 --- a/test/classes/SqlTest.php +++ b/test/classes/SqlTest.php @@ -381,7 +381,7 @@ class SqlTest extends AbstractTestCase . ' select al.user_id, max(al.id) as id from game_auth_logs al ' . 'where al.successfull = 1 group by al.user_id ) last_log on last_log.id = l.id;', ['max_rows' => 50, 'pos' => 0], - 164056, + 267, 50, false, 'SELECT COUNT(*) FROM (select l.* from game_auth_logs l join (' From ee3cca816a7d450afcf8301836287db5d9fc8eab Mon Sep 17 00:00:00 2001 From: Kristijan Fremen Velkovski Date: Sun, 30 Oct 2022 16:33:27 +0000 Subject: [PATCH 6/7] Translated using Weblate (Macedonian) Currently translated at 18.7% (642 of 3418 strings) [ci skip] Translation: phpMyAdmin/5.2 Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/mk/ Signed-off-by: Kristijan Fremen Velkovski --- po/mk.po | 57 ++++++++++++++++++++------------------------------------ 1 file changed, 20 insertions(+), 37 deletions(-) diff --git a/po/mk.po b/po/mk.po index fb20d7d3f1..7c4bb2dfd1 100644 --- a/po/mk.po +++ b/po/mk.po @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 5.2.1-dev\n" "Report-Msgid-Bugs-To: translators@phpmyadmin.net\n" "POT-Creation-Date: 2022-09-29 00:17-0300\n" -"PO-Revision-Date: 2022-10-29 17:26+0000\n" +"PO-Revision-Date: 2022-10-31 17:01+0000\n" "Last-Translator: Kristijan Fremen Velkovski \n" "Language-Team: Macedonian \n" @@ -546,9 +546,8 @@ msgstr "" "%% MyISAM искористен клучен бафер: %s%%, оваа вредност треба да биде над 95%%" #: libraries/advisory_rules_generic.php:404 -#, fuzzy msgid "Percentage of index reads from memory" -msgstr "Прикажи комплетни упити" +msgstr "Процентажа на индекс читања од меморија" #: libraries/advisory_rules_generic.php:409 #, no-php-format @@ -610,20 +609,19 @@ msgid "" msgstr "" #: libraries/advisory_rules_generic.php:445 -#, fuzzy msgid "Rate of open files" -msgstr "Кодна страна на податотеката:" +msgstr "Рата на отворени фајлови" #: libraries/advisory_rules_generic.php:448 -#, fuzzy msgid "The rate of opening files is high." -msgstr "Кодна страна на податотеката:" +msgstr "Ратата на отворени фајлови е висока." #: libraries/advisory_rules_generic.php:453 -#, fuzzy, php-format -#| msgid "Sort buffer size" +#, php-format msgid "Opened files rate: %s, this value should be less than 5 per hour" -msgstr "Големина на меѓупросторот за подредување" +msgstr "" +"Рата на отворени фајлови: %s, оваа вредност треба да биде помалку од 5 на " +"саат" #: libraries/advisory_rules_generic.php:459 #, fuzzy, no-php-format @@ -5181,16 +5179,13 @@ msgid "" msgstr "" #: libraries/classes/Controllers/HomeController.php:195 -#, fuzzy, php-format -#| msgid "" -#| " additional features for working with linked tables have been ctivated. " -#| "To find out why click %shere%s." +#, php-format msgid "" "The phpMyAdmin configuration storage is not completely configured, some " "extended features have been deactivated. %sFind out why%s. " msgstr "" -"Дополнителните можности за работа со поврзаните табели се исклучени. За да " -"дознаете зошто, кликнете %sовде%s." +"Складиштето за конфигурација на phpMyAdmin не е комплетно подесено, некои " +"проширени особини се деактивирани. %Пронајдете зашто%s. " #: libraries/classes/Controllers/HomeController.php:201 msgid "" @@ -5431,16 +5426,14 @@ msgid "This operation could take a long time. Proceed anyway?" msgstr "Оваа операција може да потрае. Да ли да продолжиме?" #: libraries/classes/Controllers/JavaScriptMessagesController.php:57 -#, fuzzy, php-format -#| msgid "Do you really want to " +#, php-format msgid "Do you really want to delete user group \"%s\"?" -msgstr "Дали навистина сакате да " +msgstr "Дали навистина сакате да ја избришете корисничата група \"%s\"?" #: libraries/classes/Controllers/JavaScriptMessagesController.php:58 -#, fuzzy, php-format -#| msgid "Do you really want to " +#, php-format msgid "Do you really want to delete the search \"%s\"?" -msgstr "Дали навистина сакате да " +msgstr "Дали навистина сакате да го избришете пребарувањето \"%s\"?" #: libraries/classes/Controllers/JavaScriptMessagesController.php:59 msgid "You have unsaved changes; are you sure you want to leave this page?" @@ -5453,22 +5446,16 @@ msgid "" msgstr "" #: libraries/classes/Controllers/JavaScriptMessagesController.php:64 -#, fuzzy -#| msgid "Do you really want to " msgid "Do you really want to revoke the selected user(s) ?" -msgstr "Дали навистина сакате да " +msgstr "Дали навистина сакате да укинете избраниот(ите) корисник(ци) ?" #: libraries/classes/Controllers/JavaScriptMessagesController.php:65 -#, fuzzy -#| msgid "Do you really want to " msgid "Do you really want to delete this central column?" -msgstr "Дали навистина сакате да " +msgstr "Дали навистина сакате да ја избришете оваа централна колона?" #: libraries/classes/Controllers/JavaScriptMessagesController.php:66 -#, fuzzy -#| msgid "Do you really want to " msgid "Do you really want to delete the selected items?" -msgstr "Дали навистина сакате да " +msgstr "Дали навистина сакате да ги избришете избраните елеметни?" #: libraries/classes/Controllers/JavaScriptMessagesController.php:68 msgid "" @@ -5477,16 +5464,12 @@ msgid "" msgstr "" #: libraries/classes/Controllers/JavaScriptMessagesController.php:71 -#, fuzzy -#| msgid "Do you really want to " msgid "Do you really want to TRUNCATE the selected partition(s)?" -msgstr "Дали навистина сакате да " +msgstr "Дали навистина сакате да ги СКРАТИТЕ избраната(ите) партиција(ии)?" #: libraries/classes/Controllers/JavaScriptMessagesController.php:72 -#, fuzzy -#| msgid "Do you really want to " msgid "Do you really want to remove partitioning?" -msgstr "Дали навистина сакате да " +msgstr "Дали навистина сакате да ги отстраните партициите?" #: libraries/classes/Controllers/JavaScriptMessagesController.php:73 #, fuzzy From 472391794fc0d60c5024f31e75afafe562a652c8 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Mon, 31 Oct 2022 19:24:50 +0100 Subject: [PATCH 7/7] Add a ChangeLog entry for #16042 Signed-off-by: William Desportes --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index df52ffde42..4a98fea8a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -54,6 +54,7 @@ phpMyAdmin - ChangeLog - issue #17553 Fix Metro theme unreadable links above navigation tree - issue #17553 Metro theme UI fixes and improvements - issue #17553 Fix Metro theme login form with +- issue #16042 Exported gzip file of database has first ~73 kB uncompressed and rest is gzip compressed in Firefox 5.2.0 (2022-05-10) - issue #16521 Upgrade Bootstrap to version 5