diff --git a/ChangeLog b/ChangeLog index 47666be384..8a8f30b35c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -56,6 +56,7 @@ VerboseMultiSubmit, ReplaceHelpImg + Dropped configuration directive: NaviDatabaseNameColor + Added configuration directive: MaxNavigationItems + Renamed configuration directive: LeftFrameDBTree => NavigationTreeEnableGrouping ++ Renamed configuration directive: LeftFrameDBSeparator => NavigationTreeDbSeparator 3.5.4.0 (not yet released) - bug #3570212 [edit] uuid_short() is a no-arguments function diff --git a/Documentation.html b/Documentation.html index 716a6c9961..ad7322c6ea 100644 --- a/Documentation.html +++ b/Documentation.html @@ -1527,10 +1527,10 @@ CREATE DATABASE,ALTER DATABASE,DROP DATABASE
$cfg['NavigationTreeEnableGrouping'] boolean
Defines whether to group the databases based on a common prefix prefix in their name - $cfg['LeftFrameDBSeparator']. + $cfg['NavigationTreeDbSeparator'].
-
$cfg['LeftFrameDBSeparator'] +
$cfg['NavigationTreeDbSeparator'] string or array
The string used to separate the parts of the database name when showing them in a tree. Alternatively you can specify more strings in an array diff --git a/libraries/List_Database.class.php b/libraries/List_Database.class.php index 28f52e5486..b887716a38 100644 --- a/libraries/List_Database.class.php +++ b/libraries/List_Database.class.php @@ -257,10 +257,10 @@ class PMA_List_Database extends PMA_List if (!$GLOBALS['cfg']['NavigationTreeEnableGrouping']) { $separators = array(); - } elseif (is_array($GLOBALS['cfg']['LeftFrameDBSeparator'])) { - $separators = $GLOBALS['cfg']['LeftFrameDBSeparator']; - } elseif (!empty($GLOBALS['cfg']['LeftFrameDBSeparator'])) { - $separators = array($GLOBALS['cfg']['LeftFrameDBSeparator']); + } elseif (is_array($GLOBALS['cfg']['NavigationTreeDbSeparator'])) { + $separators = $GLOBALS['cfg']['NavigationTreeDbSeparator']; + } elseif (!empty($GLOBALS['cfg']['NavigationTreeDbSeparator'])) { + $separators = array($GLOBALS['cfg']['NavigationTreeDbSeparator']); } else { $separators = array(); } diff --git a/libraries/config.default.php b/libraries/config.default.php index a86157c6ec..f75bbb8c2c 100644 --- a/libraries/config.default.php +++ b/libraries/config.default.php @@ -800,9 +800,9 @@ $cfg['NavigationTreeEnableGrouping'] = true; /** * the separator to sub-tree the select-based light menu tree * - * @global string $cfg['LeftFrameDBSeparator'] + * @global string $cfg['NavigationTreeDbSeparator'] */ -$cfg['LeftFrameDBSeparator'] = '_'; +$cfg['NavigationTreeDbSeparator'] = '_'; /** * Which string will be used to generate table prefixes diff --git a/libraries/config.values.php b/libraries/config.values.php index cc9d2226a3..b9447972d8 100644 --- a/libraries/config.values.php +++ b/libraries/config.values.php @@ -43,7 +43,7 @@ $cfg_db['LeftDefaultTabTable'] = array( 'tbl_change.php', // insert row page 'sql.php' // browse page ); -$cfg_db['LeftFrameDBSeparator'] = 'short_string'; +$cfg_db['NavigationTreeDbSeparator'] = 'short_string'; $cfg_db['LeftFrameTableSeparator'] = 'short_string'; $cfg_db['NavigationBarIconic'] = array( true => __('Yes'), diff --git a/libraries/config/messages.inc.php b/libraries/config/messages.inc.php index d3f8c726d6..e11f8131bc 100644 --- a/libraries/config/messages.inc.php +++ b/libraries/config/messages.inc.php @@ -275,8 +275,6 @@ $strConfigLeftDisplayServers_desc = __('Display server choice at the top of the $strConfigLeftDisplayServers_name = __('Display servers selection'); $strConfigLeftDisplayTableFilterMinimum_name = __('Minimum number of tables to display the table filter box'); $strConfigLeftDisplayDatabaseFilterMinimum_name = __('Minimum number of databases to display the database filter box'); -$strConfigLeftFrameDBSeparator_desc = __('String that separates databases into different tree levels'); -$strConfigLeftFrameDBSeparator_name = __('Database tree separator'); $strConfigLeftFrameTableLevel_name = __('Maximum table tree depth'); $strConfigLeftFrameTableSeparator_desc = __('String that separates tables into different tree levels'); $strConfigLeftFrameTableSeparator_name = __('Table tree separator'); @@ -318,6 +316,8 @@ $strConfigMemoryLimit_desc = __('The number of bytes a script is allowed to allo $strConfigMemoryLimit_name = __('Memory limit'); $strConfigNavigationTreeEnableGrouping_desc = __('Group items in the navigation tree (determined by the separator defined below)'); $strConfigNavigationTreeEnableGrouping_name = __('Group items in the tree'); +$strConfigNavigationTreeDbSeparator_desc = __('String that separates databases into different tree levels'); +$strConfigNavigationTreeDbSeparator_name = __('Database tree separator'); $strConfigRowActionLinks_desc = __('These are Edit, Copy and Delete links'); $strConfigRowActionLinks_name = __('Where to show the table row links'); $strConfigNaturalOrder_desc = __('Use natural order for sorting table and database names'); diff --git a/libraries/config/setup.forms.php b/libraries/config/setup.forms.php index 9a3e0151cd..8814214b68 100644 --- a/libraries/config/setup.forms.php +++ b/libraries/config/setup.forms.php @@ -173,7 +173,7 @@ $forms['Left_frame']['Left_servers'] = array( 'LeftDisplayServers', 'DisplayServersList'); $forms['Left_frame']['Left_databases'] = array( - 'LeftFrameDBSeparator'); + 'NavigationTreeDbSeparator'); $forms['Left_frame']['Left_tables'] = array( 'LeftDisplayTableFilterMinimum', 'LeftDefaultTabTable', diff --git a/libraries/config/user_preferences.forms.php b/libraries/config/user_preferences.forms.php index a763e5affd..56f85577d0 100644 --- a/libraries/config/user_preferences.forms.php +++ b/libraries/config/user_preferences.forms.php @@ -87,7 +87,7 @@ $forms['Left_frame']['Left_frame'] = array( 'NavigationTreeEnableGrouping'); $forms['Left_frame']['Left_databases'] = array( 'LeftDisplayDatabaseFilterMinimum', - 'LeftFrameDBSeparator'); + 'NavigationTreeDbSeparator'); $forms['Left_frame']['Left_tables'] = array( 'LeftDisplayTableFilterMinimum', 'LeftDefaultTabTable', diff --git a/libraries/navigation/NavigationTree.class.php b/libraries/navigation/NavigationTree.class.php index 6a72fa390c..376a0327a2 100644 --- a/libraries/navigation/NavigationTree.class.php +++ b/libraries/navigation/NavigationTree.class.php @@ -132,7 +132,7 @@ class PMA_NavigationTree $node = new Node('root', Node::CONTAINER); $this->_tree = $node; if ($GLOBALS['cfg']['NavigationTreeEnableGrouping']) { - $this->_tree->separator = $GLOBALS['cfg']['LeftFrameDBSeparator']; + $this->_tree->separator = $GLOBALS['cfg']['NavigationTreeDbSeparator']; $this->_tree->separator_depth = 10000; } } diff --git a/test/classes/PMA_List_Database_test.php b/test/classes/PMA_List_Database_test.php index 637b8a1edd..fa224c616c 100644 --- a/test/classes/PMA_List_Database_test.php +++ b/test/classes/PMA_List_Database_test.php @@ -121,7 +121,7 @@ class PMA_List_Database_test extends PHPUnit_Framework_TestCase $GLOBALS['cfgRelation']['commwork'] = true; $GLOBALS['server'] = 1; $GLOBALS['cfg']['NavigationTreeEnableGrouping'] = true; - $GLOBALS['cfg']['LeftFrameDBSeparator'] = array('|',','); + $GLOBALS['cfg']['NavigationTreeDbSeparator'] = array('|',','); $this->assertEquals( $this->object->getGroupedDetails(10, 100), @@ -140,7 +140,7 @@ class PMA_List_Database_test extends PHPUnit_Framework_TestCase $GLOBALS['cfgRelation']['commwork'] = true; $GLOBALS['server'] = 1; $GLOBALS['cfg']['NavigationTreeEnableGrouping'] = true; - $GLOBALS['cfg']['LeftFrameDBSeparator'] = array('|',','); + $GLOBALS['cfg']['NavigationTreeDbSeparator'] = array('|',','); $this->assertEquals( $this->object->getHtmlListGrouped(true, 5, 5),