Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--libraries/classes/Controllers/HomeController.php14
-rw-r--r--psalm-baseline.xml7
-rw-r--r--psalm.xml1
4 files changed, 7 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index 96df502c38..070019fbe4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,7 @@ phpMyAdmin - ChangeLog
- issue #17519 Fix Export pages not working in certain conditions
- issue #17496 Fix error in table operation page when partitions are broken
- issue #17386 Fix system memory and system swap values on Windows
+- issue #17517 Fix Database Server panel not getting hidden by ShowServerInfo configuration directive
5.2.0 (2022-05-10)
- issue #16521 Upgrade Bootstrap to version 5
diff --git a/libraries/classes/Controllers/HomeController.php b/libraries/classes/Controllers/HomeController.php
index 91070af929..03e089a562 100644
--- a/libraries/classes/Controllers/HomeController.php
+++ b/libraries/classes/Controllers/HomeController.php
@@ -150,20 +150,14 @@ class HomeController extends AbstractController
}
$databaseServer = [];
- if ($GLOBALS['server'] > 0) {
+ if ($GLOBALS['server'] > 0 && $GLOBALS['cfg']['ShowServerInfo']) {
$hostInfo = '';
if (! empty($GLOBALS['cfg']['Server']['verbose'])) {
- $hostInfo .= $GLOBALS['cfg']['Server']['verbose'];
- if ($GLOBALS['cfg']['ShowServerInfo']) {
- $hostInfo .= ' (';
- }
+ $hostInfo .= $GLOBALS['cfg']['Server']['verbose'] . ' (';
}
- if ($GLOBALS['cfg']['ShowServerInfo'] || empty($GLOBALS['cfg']['Server']['verbose'])) {
- $hostInfo .= $this->dbi->getHostInfo();
- }
-
- if (! empty($GLOBALS['cfg']['Server']['verbose']) && $GLOBALS['cfg']['ShowServerInfo']) {
+ $hostInfo .= $this->dbi->getHostInfo();
+ if (! empty($GLOBALS['cfg']['Server']['verbose'])) {
$hostInfo .= ')';
}
diff --git a/psalm-baseline.xml b/psalm-baseline.xml
index b0694fed02..07b48d759a 100644
--- a/psalm-baseline.xml
+++ b/psalm-baseline.xml
@@ -2199,13 +2199,12 @@
</MixedArrayAssignment>
</file>
<file src="libraries/classes/Controllers/HomeController.php">
- <InvalidArrayOffset occurrences="10">
+ <InvalidArrayOffset occurrences="9">
<code>$GLOBALS['cfg']['LoginCookieValidityDisableWarning']</code>
<code>$GLOBALS['cfg']['NavigationDisplayServers']</code>
<code>$GLOBALS['cfg']['PmaNoRelation_DisableWarning']</code>
<code>$GLOBALS['cfg']['ShowChgPassword']</code>
<code>$GLOBALS['cfg']['ShowPhpInfo']</code>
- <code>$GLOBALS['cfg']['ShowServerInfo']</code>
<code>$GLOBALS['cfg']['SuhosinDisableWarning']</code>
<code>$GLOBALS['cfg']['ThemeManager']</code>
<code>$GLOBALS['cfg']['TranslationWarningThreshold']</code>
@@ -2231,10 +2230,6 @@
<PossiblyNullArrayOffset occurrences="1">
<code>$GLOBALS['language_stats']</code>
</PossiblyNullArrayOffset>
- <PossiblyUndefinedArrayOffset occurrences="2">
- <code>$GLOBALS['cfg']['ShowServerInfo']</code>
- <code>$GLOBALS['cfg']['ShowServerInfo']</code>
- </PossiblyUndefinedArrayOffset>
<UnusedVariable occurrences="1">
<code>$collationsList</code>
</UnusedVariable>
diff --git a/psalm.xml b/psalm.xml
index cf26119f58..4b3a1cadd4 100644
--- a/psalm.xml
+++ b/psalm.xml
@@ -203,6 +203,7 @@
ShowFunctionFields: bool,
ShowHint: bool,
ShowPropertyComments: bool,
+ ShowServerInfo: bool,
ShowSQL: bool,
ShowStats: bool,
TextareaAutoSelect: bool,