diff --git a/ChangeLog b/ChangeLog index eea05ad94..497d44569 100644 --- a/ChangeLog +++ b/ChangeLog @@ -49,6 +49,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA thanks to Christian Schmidt + [doc] requirement of mcrypt on 64-bit, thanks to Isaac Bennetch + [lang] danish update, thanks to Finn Sorensen ++ RFE #1435922 [gui] navigation frame shows listing of databases when none selected 2.10.1.0 (not released yet) ===================== diff --git a/Documentation.html b/Documentation.html index 3418f13a2..a0effbcd5 100644 --- a/Documentation.html +++ b/Documentation.html @@ -1247,9 +1247,10 @@ ALTER TABLE `pma_column_comments`
$cfg['DisplayServersList'] boolean
Defines whether to display this server choice as links instead of in a drop-down. Defaults to FALSE (drop-down).
-
$cfg['DisplayDatabasesList'] boolean
+
$cfg['DisplayDatabasesList'] boolean or text
Defines whether to display database choice in light navigation frame as links - instead of in a drop-down. Defaults to FALSE (drop-down).
+ instead of in a drop-down. Defaults to 'auto' - on main page list is + shown, when database is selected, only drop down is displayed.
$cfg['ShowStats'] boolean
Defines whether or not to display space usage and statistics about databases and tables.
diff --git a/libraries/config.default.php b/libraries/config.default.php index 80dae964b..ec1f2202b 100644 --- a/libraries/config.default.php +++ b/libraries/config.default.php @@ -567,7 +567,7 @@ $cfg['DisplayServersList'] = false; * * @global boolean $cfg['DisplayDatabasesList'] */ -$cfg['DisplayDatabasesList'] = false; +$cfg['DisplayDatabasesList'] = 'auto'; /******************************************************************************* diff --git a/navigation.php b/navigation.php index 924176fda..5f57e77de 100644 --- a/navigation.php +++ b/navigation.php @@ -159,7 +159,15 @@ if (! $GLOBALS['server']) { echo '

' . $GLOBALS['strNoDatabases'] . '

'; PMA_exitNavigationFrame(); } elseif ($GLOBALS['cfg']['LeftFrameLight'] && $GLOBALS['PMA_List_Database']->count() > 1) { - if (!$cfg['DisplayDatabasesList']) { + $list = $cfg['DisplayDatabasesList']; + if ($list === 'auto') { + if (empty($GLOBALS['db'])) { + $list = true; + } else { + $list = false; + } + } + if (!$list) { // more than one database available and LeftFrameLight is true // display db selectbox // diff --git a/scripts/setup.php b/scripts/setup.php index e4e7c4b6f..43cfed9f6 100644 --- a/scripts/setup.php +++ b/scripts/setup.php @@ -1042,7 +1042,7 @@ function show_left_form($defaults = array()) { array('Show logo', 'LeftDisplayLogo', 'Whether to show logo in left frame', TRUE), array('Display servers selection', 'LeftDisplayServers', 'Whether to show server selection in left frame', FALSE), array('Display servers as list', 'DisplayServersList', 'Whether to show server listing as list instead of drop down', FALSE), - array('Display databases as list', 'DisplayDatabasesList', 'Whether to show database listing in navigation as list instead of drop down', FALSE), + array('Display databases as list', 'DisplayDatabasesList', 'Whether to show database listing in navigation as list instead of drop down', array('auto', 'yes', 'no')), array('Enable pointer highlighting', 'LeftPointerEnable', 'Whether you want to highlight server under mouse', TRUE), ), 'Configure navigation frame', @@ -1662,8 +1662,15 @@ switch ($action) { case 'lay_navigation_real': if (isset($_POST['submit_save'])) { - $vals = grab_values('LeftFrameLight:bool;LeftFrameDBTree:bool;LeftFrameDBSeparator;LeftFrameTableSeparator;LeftFrameTableLevel:int;LeftDisplayLogo:bool;LeftDisplayServers:bool;DisplayServersList:bool;DisplayDatabasesList:bool;LeftPointerEnable:bool'); + $vals = grab_values('LeftFrameLight:bool;LeftFrameDBTree:bool;LeftFrameDBSeparator;LeftFrameTableSeparator;LeftFrameTableLevel:int;LeftDisplayLogo:bool;LeftDisplayServers:bool;DisplayServersList:bool;DisplayDatabasesList;LeftPointerEnable:bool'); $err = FALSE; + if (isset($vals['DisplayDatabasesList'])) { + if ($vals['DisplayDatabasesList'] == 'yes') { + $vals['DisplayDatabasesList'] = true; + } elseif ($vals['DisplayDatabasesList'] == 'no') { + $vals['DisplayDatabasesList'] = false; + } + } if (isset($vals['LeftFrameTableLevel']) && $vals['LeftFrameTableLevel'] < 1) { message('error', 'Invalid value for maximum table nesting level!'); $err = TRUE;