Change tables name from 'navigation' to 'navigationhiding'
This commit is contained in:
parent
d0522a779c
commit
04c2e88d67
@ -61,7 +61,7 @@ $cfg['Servers'][$i]['AllowNoPassword'] = false;
|
||||
// $cfg['Servers'][$i]['recent'] = 'pma__recent';
|
||||
// $cfg['Servers'][$i]['users'] = 'pma__users';
|
||||
// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
|
||||
// $cfg['Servers'][$i]['navigation'] = 'pma__navigation';
|
||||
// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
|
||||
/* Contrib / Swekey authentication */
|
||||
// $cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey-pma.conf';
|
||||
|
||||
|
||||
@ -673,8 +673,8 @@ Server connection settings
|
||||
:config:option:`$cfg['Servers'][$i]['users']` (e.g. ``pma__users``) and
|
||||
:config:option:`$cfg['Servers'][$i]['usergroups']` (e.g. ``pma__usergroups``)
|
||||
|
||||
.. _navigation:
|
||||
.. config:option:: $cfg['Servers'][$i]['navigation']
|
||||
.. _navigationhiding:
|
||||
.. config:option:: $cfg['Servers'][$i]['navigationhiding']
|
||||
|
||||
:type: string
|
||||
:default: ``''``
|
||||
@ -684,8 +684,8 @@ Server connection settings
|
||||
To allow the usage of this functionality:
|
||||
|
||||
* set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
|
||||
* put the table name in :config:option:`$cfg['Servers'][$i]['navigation']` (e.g.
|
||||
``pma__navigation``)
|
||||
* put the table name in :config:option:`$cfg['Servers'][$i]['navigationhiding']` (e.g.
|
||||
``pma__navigationhiding``)
|
||||
|
||||
.. _tracking:
|
||||
.. config:option:: $cfg['Servers'][$i]['tracking']
|
||||
|
||||
@ -47,5 +47,5 @@ foreach ($hosts as $host) {
|
||||
$cfg['Servers'][$i]['recent'] = 'pma__recent';
|
||||
$cfg['Servers'][$i]['users'] = 'pma__users';
|
||||
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
|
||||
$cfg['Servers'][$i]['navigation'] = 'pma__navigation';
|
||||
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
|
||||
}
|
||||
|
||||
@ -306,10 +306,10 @@ CREATE TABLE IF NOT EXISTS `pma__usergroups` (
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `pma__navigation`
|
||||
-- Table structure for table `pma__navigationhiding`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `pma__navigation` (
|
||||
CREATE TABLE IF NOT EXISTS `pma__navigationhiding` (
|
||||
`username` varchar(64) NOT NULL,
|
||||
`item_name` varchar(64) NOT NULL,
|
||||
`item_type` varchar(64) NOT NULL,
|
||||
|
||||
@ -292,10 +292,10 @@ CREATE TABLE IF NOT EXISTS `pma__usergroups` (
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `pma__navigation`
|
||||
-- Table structure for table `pma__navigationhiding`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `pma__navigation` (
|
||||
CREATE TABLE IF NOT EXISTS `pma__navigationhiding` (
|
||||
`username` varchar(64) NOT NULL,
|
||||
`item_name` varchar(64) NOT NULL,
|
||||
`item_type` varchar(64) NOT NULL,
|
||||
|
||||
@ -423,9 +423,9 @@ $cfg['Servers'][$i]['usergroups'] = '';
|
||||
/**
|
||||
* table to store information about item hidden from navigation triee
|
||||
* - leave blank to disable hide/show navigation items feature
|
||||
* SUGGESTED: 'pma__navigation'
|
||||
* SUGGESTED: 'pma__navigationhiding'
|
||||
*
|
||||
* @global string $cfg['Servers'][$i]['navigation']
|
||||
* @global string $cfg['Servers'][$i]['navigationhiding']
|
||||
*/
|
||||
$cfg['Servers'][$i]['nagivation'] = '';
|
||||
|
||||
|
||||
@ -72,7 +72,7 @@ $forms['Servers']['Server_pmadb'] = array('Servers' => array(1 => array(
|
||||
'userconfig' => 'pma__userconfig',
|
||||
'users' => 'pma__users',
|
||||
'usergroups' => 'pma__usergroups',
|
||||
'navigation' => 'pma__navigation',
|
||||
'navigationhiding' => 'pma__navigationhiding',
|
||||
'table_info' => 'pma__table_info',
|
||||
'column_info' => 'pma__column_info',
|
||||
'history' => 'pma__history',
|
||||
|
||||
@ -88,7 +88,7 @@ class PMA_Navigation
|
||||
$itemName, $itemType, $dbName, $tableName = null
|
||||
) {
|
||||
$navTable = PMA_Util::backquote($GLOBALS['cfgRelation']['db'])
|
||||
. "." . PMA_Util::backquote($GLOBALS['cfgRelation']['navigation']);
|
||||
. "." . PMA_Util::backquote($GLOBALS['cfgRelation']['navigationhiding']);
|
||||
$sqlQuery = "INSERT INTO " . $navTable
|
||||
. "(`username`, `item_name`, `item_type`, `db_name`, `table_name`)"
|
||||
. " VALUES ("
|
||||
@ -116,7 +116,7 @@ class PMA_Navigation
|
||||
$itemName, $itemType, $dbName, $tableName = null
|
||||
) {
|
||||
$navTable = PMA_Util::backquote($GLOBALS['cfgRelation']['db'])
|
||||
. "." . PMA_Util::backquote($GLOBALS['cfgRelation']['navigation']);
|
||||
. "." . PMA_Util::backquote($GLOBALS['cfgRelation']['navigationhiding']);
|
||||
$sqlQuery = "DELETE FROM " . $navTable
|
||||
. " WHERE "
|
||||
. " `username`='"
|
||||
@ -147,7 +147,7 @@ class PMA_Navigation
|
||||
$html .= PMA_generate_common_hidden_inputs($dbName, $tableName);
|
||||
|
||||
$navTable = PMA_Util::backquote($GLOBALS['cfgRelation']['db'])
|
||||
. "." . PMA_Util::backquote($GLOBALS['cfgRelation']['navigation']);
|
||||
. "." . PMA_Util::backquote($GLOBALS['cfgRelation']['navigationhiding']);
|
||||
$sqlQuery = "SELECT `item_name`, `item_type` FROM " . $navTable
|
||||
. " WHERE `username`='"
|
||||
. PMA_Util::sqlAddSlashes($GLOBALS['cfg']['Server']['user']) ."'"
|
||||
|
||||
@ -445,7 +445,7 @@ class Node_Database extends Node
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
if ($cfgRelation['navwork']) {
|
||||
$navTable = PMA_Util::backquote($cfgRelation['db'])
|
||||
. "." . PMA_Util::backquote($cfgRelation['navigation']);
|
||||
. "." . PMA_Util::backquote($cfgRelation['navigationhiding']);
|
||||
$sqlQuery = "SELECT `item_name` FROM " . $navTable
|
||||
. " WHERE `username`='" . $cfgRelation['user'] . "'"
|
||||
. " AND `item_type`='" . substr($type, 0, -1) . "'"
|
||||
@ -493,7 +493,7 @@ class Node_Database extends Node
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
if ($cfgRelation['navwork']) {
|
||||
$navTable = PMA_Util::backquote($cfgRelation['db'])
|
||||
. "." . PMA_Util::backquote($cfgRelation['navigation']);
|
||||
. "." . PMA_Util::backquote($cfgRelation['navigationhiding']);
|
||||
$sqlQuery = "SELECT COUNT(*) FROM " . $navTable
|
||||
. " WHERE `username`='"
|
||||
. PMA_Util::sqlAddSlashes($GLOBALS['cfg']['Server']['user']) ."'"
|
||||
|
||||
@ -266,10 +266,10 @@ function PMA_getRelationsParamDiagnostic($cfgRelation)
|
||||
$messages
|
||||
);
|
||||
$retval .= PMA_getDiagMessageForParameter(
|
||||
'navigation',
|
||||
isset($cfgRelation['navigation']),
|
||||
'navigationhiding',
|
||||
isset($cfgRelation['navigationhiding']),
|
||||
$messages,
|
||||
'navigation'
|
||||
'navigationhiding'
|
||||
);
|
||||
$retval .= PMA_getDiagMessageForFeature(
|
||||
__('Hide/show navigation items'),
|
||||
@ -457,8 +457,8 @@ function PMA_checkRelationsParam()
|
||||
$cfgRelation['users'] = $curr_table[0];
|
||||
} elseif ($curr_table[0] == $GLOBALS['cfg']['Server']['usergroups']) {
|
||||
$cfgRelation['usergroups'] = $curr_table[0];
|
||||
} elseif ($curr_table[0] == $GLOBALS['cfg']['Server']['navigation']) {
|
||||
$cfgRelation['navigation'] = $curr_table[0];
|
||||
} elseif ($curr_table[0] == $GLOBALS['cfg']['Server']['navigationhiding']) {
|
||||
$cfgRelation['navigationhiding'] = $curr_table[0];
|
||||
}
|
||||
} // end while
|
||||
$GLOBALS['dbi']->freeResult($tab_rs);
|
||||
@ -513,7 +513,7 @@ function PMA_checkRelationsParam()
|
||||
$cfgRelation['menuswork'] = true;
|
||||
}
|
||||
|
||||
if (isset($cfgRelation['navigation'])) {
|
||||
if (isset($cfgRelation['navigationhiding'])) {
|
||||
$cfgRelation['navwork'] = true;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user