diff --git a/ChangeLog b/ChangeLog index 3c254f873e..df798ec980 100644 --- a/ChangeLog +++ b/ChangeLog @@ -109,6 +109,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 bec82ba0c0..09aeed50ca 100644 --- a/libraries/classes/Navigation/NavigationTree.php +++ b/libraries/classes/Navigation/NavigationTree.php @@ -19,6 +19,7 @@ use PhpMyAdmin\RecentFavoriteTable; use PhpMyAdmin\Response; use PhpMyAdmin\Template; use PhpMyAdmin\Url; +use PhpMyAdmin\Util; use const E_USER_WARNING; use function array_key_exists; use function array_keys; @@ -1351,12 +1352,15 @@ class NavigationTree } } + $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/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 }}