diff --git a/ChangeLog b/ChangeLog index 144d8bf248..9d721d3a1e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -133,6 +133,7 @@ phpMyAdmin - ChangeLog - issue #12753 Show table structure after adding a new column - issue Fix a PHP notice when logging out - issue #17090 Fix bbcode not rendered for error messages on setup +- issue #17198 Fix the database selection when the navigation tree is disabled 5.1.1 (2021-06-04) - issue #13325 Fixed created procedure shows up in triggers and events and vice-versa diff --git a/libraries/classes/Navigation/NavigationTree.php b/libraries/classes/Navigation/NavigationTree.php index 38d7402c4e..b790b4efcb 100644 --- a/libraries/classes/Navigation/NavigationTree.php +++ b/libraries/classes/Navigation/NavigationTree.php @@ -19,6 +19,7 @@ use PhpMyAdmin\RecentFavoriteTable; use PhpMyAdmin\ResponseRenderer; use PhpMyAdmin\Template; use PhpMyAdmin\Url; +use PhpMyAdmin\Util; use function __; use function _ngettext; @@ -1255,12 +1256,15 @@ class NavigationTree $nodes = $this->renderNodes($children); + $databaseUrl = Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabDatabase'], 'database'); + return $this->template->render('navigation/tree/database_select', [ 'quick_warp' => $quickWarp, 'list_navigator' => $listNavigator, 'server' => $GLOBALS['server'], 'options' => $options, 'nodes' => $nodes, + 'database_url' => $databaseUrl, ]); } diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 508ffcce29..88f1f47303 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,5 +1,5 @@ - + global $route, $containerBuilder, $request; @@ -574,13 +574,16 @@ $path $path + + $keys + + $keys[] $path $path $type $v $value - $value array @@ -604,7 +607,8 @@ $fieldsTypes $name - + + return []; return []; @@ -11574,10 +11578,6 @@ $tables[$i][Import::TBL_NAME] - - $xml - $xml - $val3 @@ -15110,13 +15110,20 @@ $config->getCookie($name) - + + $this->themes + + + $theme null (bool) $perServer (string) $this->theme->id + + $configThemeExists + $this->theme !== null diff --git a/templates/navigation/tree/database_select.twig b/templates/navigation/tree/database_select.twig index 90f804be01..5c9597592e 100644 --- a/templates/navigation/tree/database_select.twig +++ b/templates/navigation/tree/database_select.twig @@ -4,11 +4,10 @@ {{ list_navigator|raw }}
-
+ {{ get_hidden_fields({'server': server}) }} - {% for option in options %}