Skip to content

Commit dc24ffc

Browse files
committed
Merge branch 'QA_5_2'
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2 parents 913e7d4 + d819acf commit dc24ffc

File tree

6 files changed

+5
-7
lines changed

6 files changed

+5
-7
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ phpMyAdmin - ChangeLog
7979
- issue #15670 Fix case where the data is truncated after changing a longtext column's collation
8080
- issue #18865 Fix missing text-nowrap for timestamps columns
8181
- issue #19022 Fix case where tables from wrong database is loaded in navigation tree
82+
- issue #18593 Fix drop db line included in server export if exporting only data
8283
- issue #18049 Also check that curl_exec is enabled for the new version check
8384

8485
5.2.1 (2023-02-07)

psalm-baseline.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7396,9 +7396,6 @@
73967396
<code><![CDATA[Config::getInstance()]]></code>
73977397
<code><![CDATA[DatabaseInterface::getInstance()]]></code>
73987398
</DeprecatedMethod>
7399-
<InvalidArrayOffset>
7400-
<code><![CDATA[$GLOBALS['allowDeny_forbidden']]]></code>
7401-
</InvalidArrayOffset>
74027399
</file>
74037400
<file src="src/Plugins/Auth/AuthenticationCookie.php">
74047401
<DeprecatedMethod>

src/Plugins/Auth/AuthenticationConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function showFailure(string $failure): never
9595
<tr>
9696
<td>';
9797
$config = Config::getInstance();
98-
if (isset($GLOBALS['allowDeny_forbidden']) && $GLOBALS['allowDeny_forbidden']) {
98+
if ($failure === 'allow-denied') {
9999
trigger_error(__('Access denied!'), E_USER_NOTICE);
100100
} else {
101101
// Check whether user has configured something

src/Plugins/Export/ExportSql.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,9 @@ public function exportDBCreate(string $db, string $exportType, string $dbAlias =
802802

803803
$compat = $GLOBALS['sql_compatibility'] ?? 'NONE';
804804

805-
if (isset($GLOBALS['sql_drop_database'])) {
805+
$exportStructure = ! isset($GLOBALS['sql_structure_or_data'])
806+
|| in_array($GLOBALS['sql_structure_or_data'], ['structure', 'structure_and_data'], true);
807+
if ($exportStructure && isset($GLOBALS['sql_drop_database'])) {
806808
if (
807809
! $this->export->outputHandler(
808810
'DROP DATABASE IF EXISTS '

tests/unit/Plugins/Auth/AuthenticationConfigTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ public function testAuthSetUser(): void
8181
public function testAuthFails(): void
8282
{
8383
Config::getInstance()->settings['Servers'] = [1];
84-
$GLOBALS['allowDeny_forbidden'] = false;
8584

8685
$dbi = $this->getMockBuilder(DatabaseInterface::class)
8786
->disableOriginalConstructor()

tests/unit/Plugins/Auth/AuthenticationCookieTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,6 @@ public function testAuthFailsActivity(): void
750750

751751
$_COOKIE['pmaAuth-2'] = 'pass';
752752

753-
$GLOBALS['allowDeny_forbidden'] = '';
754753
Config::getInstance()->settings['LoginCookieValidity'] = 10;
755754

756755
$responseStub = new ResponseRendererStub();

0 commit comments

Comments
 (0)