Skip to content

Commit

Permalink
Change tables name from 'navigation' to 'navigationhiding'
Browse files Browse the repository at this point in the history
  • Loading branch information
kasunchathuranga committed Jul 25, 2013
1 parent d0522a7 commit 04c2e88
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion config.sample.inc.php
Expand Up @@ -61,7 +61,7 @@
// $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';

Expand Down
8 changes: 4 additions & 4 deletions doc/config.rst
Expand Up @@ -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: ``''``
Expand All @@ -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']
Expand Down
2 changes: 1 addition & 1 deletion examples/config.manyhosts.inc.php
Expand Up @@ -47,5 +47,5 @@
$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';
}
4 changes: 2 additions & 2 deletions examples/create_tables.sql
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions examples/create_tables_drizzle.sql
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions libraries/config.default.php
Expand Up @@ -423,9 +423,9 @@
/**
* 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'] = '';

Expand Down
2 changes: 1 addition & 1 deletion libraries/config/setup.forms.php
Expand Up @@ -72,7 +72,7 @@
'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',
Expand Down
6 changes: 3 additions & 3 deletions libraries/navigation/Navigation.class.php
Expand Up @@ -88,7 +88,7 @@ public function hideNavigationItem(
$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 ("
Expand Down Expand Up @@ -116,7 +116,7 @@ public function unhideNavigationItem(
$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`='"
Expand Down Expand Up @@ -147,7 +147,7 @@ public function getItemUnhideDialog($dbName, $itemType = null, $tableName = null
$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']) ."'"
Expand Down
4 changes: 2 additions & 2 deletions libraries/navigation/Nodes/Node_Database.class.php
Expand Up @@ -445,7 +445,7 @@ public function getData($type, $pos, $searchClause = '')
$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) . "'"
Expand Down Expand Up @@ -493,7 +493,7 @@ public function getHtmlForControlButtons()
$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']) ."'"
Expand Down
12 changes: 6 additions & 6 deletions libraries/relation.lib.php
Expand Up @@ -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'),
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -513,7 +513,7 @@ function PMA_checkRelationsParam()
$cfgRelation['menuswork'] = true;
}

if (isset($cfgRelation['navigation'])) {
if (isset($cfgRelation['navigationhiding'])) {
$cfgRelation['navwork'] = true;
}

Expand Down

0 comments on commit 04c2e88

Please sign in to comment.