Merge pull request #1101 from maxday/1486-possibility-of-disabling-databases-expansion

#1486 Possibility of disabling database expansion
This commit is contained in:
Michal Čihař 2014-03-26 15:34:05 +01:00
commit 01c75d95fb
6 changed files with 24 additions and 1 deletions

View File

@ -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
----------

View File

@ -950,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...

View File

@ -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');

View File

@ -176,6 +176,7 @@ $forms['Navi_panel']['Navi_panel'] = array(
'NavigationTreePointerEnable',
'MaxNavigationItems',
'NavigationTreeEnableGrouping',
'NavigationTreeDisableDatabaseExpansion',
'NavigationTreeDisplayItemFilterMinimum');
$forms['Navi_panel']['Navi_servers'] = array(
'NavigationDisplayServers',

View File

@ -85,6 +85,7 @@ $forms['Navi_panel']['Navi_panel'] = array(
'NavigationTreePointerEnable',
'MaxNavigationItems',
'NavigationTreeEnableGrouping',
'NavigationTreeDisableDatabaseExpansion',
'NavigationTreeDisplayItemFilterMinimum');
$forms['Navi_panel']['Navi_databases'] = array(
'NavigationTreeDisplayDbFilterMinimum',

View File

@ -874,7 +874,12 @@ class PMA_NavigationTree
}
}
$retval .= "<a class='expander$loaded$container'";
if(!$GLOBALS['cfg']['NavigationTreeDisableDatabaseExpansion'])
$retval .= "<a class='expander$loaded$container'";
else {
$retval .= "<a";
$icon = "";
}
$retval .= " href='#'>";
$retval .= "<span class='hide aPath'>";
$retval .= $paths['aPath'];