From 65bb55450f0418b85d76e71197f3463d76ee660a Mon Sep 17 00:00:00 2001 From: Maxime DAVID Date: Tue, 25 Mar 2014 16:28:28 -0400 Subject: [PATCH 1/2] #1486 Possibility of disabling database expansion Signed-off-by: Maxime DAVID --- libraries/config.default.php | 7 +++++++ libraries/navigation/NavigationTree.class.php | 7 ++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/libraries/config.default.php b/libraries/config.default.php index bfe685d5f6..5dbf5877d3 100644 --- a/libraries/config.default.php +++ b/libraries/config.default.php @@ -650,6 +650,13 @@ $cfg['MaxDbList'] = 100; */ $cfg['MaxTableList'] = 250; +/** + * Disables the possibility of database expansion + * + * @global boolean $cfg['DisableDatabaseExpansion'] + */ +$cfg['DisableDatabaseExpansion'] = false; + /** * whether to show hint or not * diff --git a/libraries/navigation/NavigationTree.class.php b/libraries/navigation/NavigationTree.class.php index 4a867657eb..1f7f23fe5c 100644 --- a/libraries/navigation/NavigationTree.class.php +++ b/libraries/navigation/NavigationTree.class.php @@ -874,7 +874,12 @@ class PMA_NavigationTree } } - $retval .= " Date: Wed, 26 Mar 2014 10:15:14 -0400 Subject: [PATCH 2/2] #1486 Possibility of disabling database expansion + doc + integration Signed-off-by: Maxime DAVID --- doc/config.rst | 7 +++++++ libraries/config.default.php | 13 ++++++------- libraries/config/messages.inc.php | 3 +++ libraries/config/setup.forms.php | 1 + libraries/config/user_preferences.forms.php | 1 + libraries/navigation/NavigationTree.class.php | 2 +- 6 files changed, 19 insertions(+), 8 deletions(-) diff --git a/doc/config.rst b/doc/config.rst index bdcc9d0191..5b988007d1 100644 --- a/doc/config.rst +++ b/doc/config.rst @@ -1505,6 +1505,13 @@ Navigation panel setup * ``tbl_change.php`` * ``sql.php`` +.. config:option:: $cfg['NavigationTreeDisableDatabaseExpansion'] + + :type: boolean + :default: false + + Whether or not to disable the possibility of databases expansion in the navigation panel + Main panel ---------- diff --git a/libraries/config.default.php b/libraries/config.default.php index 5dbf5877d3..68ee0fd0e8 100644 --- a/libraries/config.default.php +++ b/libraries/config.default.php @@ -650,13 +650,6 @@ $cfg['MaxDbList'] = 100; */ $cfg['MaxTableList'] = 250; -/** - * Disables the possibility of database expansion - * - * @global boolean $cfg['DisableDatabaseExpansion'] - */ -$cfg['DisableDatabaseExpansion'] = false; - /** * whether to show hint or not * @@ -957,6 +950,12 @@ $cfg['NavigationTreeDisplayDbFilterMinimum'] = 30; */ $cfg['NavigationTreeDefaultTabTable'] = 'tbl_structure.php'; +/** + * Disables the possibility of database expansion + * + * @global boolean $cfg['DisableDatabaseExpansion'] + */ +$cfg['NavigationTreeDisableDatabaseExpansion'] = false; /******************************************************************************* * In the main panel, at startup... diff --git a/libraries/config/messages.inc.php b/libraries/config/messages.inc.php index 9221dff703..5df44219ed 100644 --- a/libraries/config/messages.inc.php +++ b/libraries/config/messages.inc.php @@ -465,6 +465,9 @@ $strConfigNavigationTreeTableLevel_name = __('Maximum table tree depth'); $strConfigNavigationTreePointerEnable_desc = __('Highlight server under the mouse cursor.'); $strConfigNavigationTreePointerEnable_name = __('Enable highlighting'); +$strConfigNavigationTreeDisableDatabaseExpansion_desc + = __('Whether to disable the possibility of database expansion or not.'); +$strConfigNavigationTreeDisableDatabaseExpansion_name = __('Disable database expansion'); $strConfigNumRecentTables_desc = __('Maximum number of recently used tables; set 0 to disable.'); $strConfigNumRecentTables_name = __('Recently used tables'); diff --git a/libraries/config/setup.forms.php b/libraries/config/setup.forms.php index e979966799..9ba96c752b 100644 --- a/libraries/config/setup.forms.php +++ b/libraries/config/setup.forms.php @@ -176,6 +176,7 @@ $forms['Navi_panel']['Navi_panel'] = array( 'NavigationTreePointerEnable', 'MaxNavigationItems', 'NavigationTreeEnableGrouping', + 'NavigationTreeDisableDatabaseExpansion', 'NavigationTreeDisplayItemFilterMinimum'); $forms['Navi_panel']['Navi_servers'] = array( 'NavigationDisplayServers', diff --git a/libraries/config/user_preferences.forms.php b/libraries/config/user_preferences.forms.php index 03467dc72d..6c0e77ece8 100644 --- a/libraries/config/user_preferences.forms.php +++ b/libraries/config/user_preferences.forms.php @@ -85,6 +85,7 @@ $forms['Navi_panel']['Navi_panel'] = array( 'NavigationTreePointerEnable', 'MaxNavigationItems', 'NavigationTreeEnableGrouping', + 'NavigationTreeDisableDatabaseExpansion', 'NavigationTreeDisplayItemFilterMinimum'); $forms['Navi_panel']['Navi_databases'] = array( 'NavigationTreeDisplayDbFilterMinimum', diff --git a/libraries/navigation/NavigationTree.class.php b/libraries/navigation/NavigationTree.class.php index 1f7f23fe5c..c545e7ec7e 100644 --- a/libraries/navigation/NavigationTree.class.php +++ b/libraries/navigation/NavigationTree.class.php @@ -874,7 +874,7 @@ class PMA_NavigationTree } } - if(!$GLOBALS['cfg']['DisableDatabaseExpansion']) + if(!$GLOBALS['cfg']['NavigationTreeDisableDatabaseExpansion']) $retval .= "