Skip to content

Commit

Permalink
Use 'username' instead of 'user' to be consistent with other phpMyAdm…
Browse files Browse the repository at this point in the history
…in tables

Signed-off-by: Madhura Jayaratne <[email protected]>
  • Loading branch information
madhuracj committed Jun 23, 2015
1 parent a9f1f08 commit 3ff7a26
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions libraries/db_designer.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,55 +186,55 @@ function PMA_getSideMenuParamsArray()
if ($GLOBALS['cfgRelation']['designer_settingswork']) {
// angular_direct
$query = 'SELECT `value` FROM ' . PMA_Util::backquote($cfgRelation['db']) . '.'
. PMA_Util::backquote($cfgRelation['designer_settings']) . ' WHERE ' . PMA_Util::backquote('user') . ' = "'
. PMA_Util::backquote($cfgRelation['designer_settings']) . ' WHERE ' . PMA_Util::backquote('username') . ' = "'
. $GLOBALS['cfg']['Server']['user'] . '" AND ' . PMA_Util::backquote('index') . ' = "angular_direct"';

$result = $GLOBALS['dbi']->fetchSingleRow($query);
$params['angular_direct'] = $result['value'];

// snap_to_grid
$query = 'SELECT `value` FROM ' . PMA_Util::backquote($cfgRelation['db']) . '.'
. PMA_Util::backquote($cfgRelation['designer_settings']) . ' WHERE ' . PMA_Util::backquote('user') . ' = "'
. PMA_Util::backquote($cfgRelation['designer_settings']) . ' WHERE ' . PMA_Util::backquote('username') . ' = "'
. $GLOBALS['cfg']['Server']['user'] . '" AND ' . PMA_Util::backquote('index') . ' = "snap_to_grid"';

$result = $GLOBALS['dbi']->fetchSingleRow($query);
$params['snap_to_grid'] = $result['value'];

// small_big_all
$query = 'SELECT `value` FROM ' . PMA_Util::backquote($cfgRelation['db']) . '.'
. PMA_Util::backquote($cfgRelation['designer_settings']) . ' WHERE ' . PMA_Util::backquote('user') . ' = "'
. PMA_Util::backquote($cfgRelation['designer_settings']) . ' WHERE ' . PMA_Util::backquote('username') . ' = "'
. $GLOBALS['cfg']['Server']['user'] . '" AND ' . PMA_Util::backquote('index') . ' = "small_big_all"';

$result = $GLOBALS['dbi']->fetchSingleRow($query);
$params['small_big_all'] = $result['value'];

// relation_lines
$query = 'SELECT `value` FROM ' . PMA_Util::backquote($cfgRelation['db']) . '.'
. PMA_Util::backquote($cfgRelation['designer_settings']) . ' WHERE ' . PMA_Util::backquote('user') . ' = "'
. PMA_Util::backquote($cfgRelation['designer_settings']) . ' WHERE ' . PMA_Util::backquote('username') . ' = "'
. $GLOBALS['cfg']['Server']['user'] . '" AND ' . PMA_Util::backquote('index') . ' = "relation_lines"';

$result = $GLOBALS['dbi']->fetchSingleRow($query);
$params['relation_lines'] = $result['value'];

// full_screen
$query = 'SELECT `value` FROM ' . PMA_Util::backquote($cfgRelation['db']) . '.'
. PMA_Util::backquote($cfgRelation['designer_settings']) . ' WHERE ' . PMA_Util::backquote('user') . ' = "'
. PMA_Util::backquote($cfgRelation['designer_settings']) . ' WHERE ' . PMA_Util::backquote('username') . ' = "'
. $GLOBALS['cfg']['Server']['user'] . '" AND ' . PMA_Util::backquote('index') . ' = "full_screen"';

$result = $GLOBALS['dbi']->fetchSingleRow($query);
$params['full_screen'] = $result['value'];

// side_menu
$query = 'SELECT `value` FROM ' . PMA_Util::backquote($cfgRelation['db']) . '.'
. PMA_Util::backquote($cfgRelation['designer_settings']) . ' WHERE ' . PMA_Util::backquote('user') . ' = "'
. PMA_Util::backquote($cfgRelation['designer_settings']) . ' WHERE ' . PMA_Util::backquote('username') . ' = "'
. $GLOBALS['cfg']['Server']['user'] . '" AND ' . PMA_Util::backquote('index') . ' = "side_menu"';

$result = $GLOBALS['dbi']->fetchSingleRow($query);
$params['side_menu'] = $result['value'];

// pin_text
$query = 'SELECT `value` FROM ' . PMA_Util::backquote($cfgRelation['db']) . '.'
. PMA_Util::backquote($cfgRelation['designer_settings']) . ' WHERE ' . PMA_Util::backquote('user') . ' = "'
. PMA_Util::backquote($cfgRelation['designer_settings']) . ' WHERE ' . PMA_Util::backquote('username') . ' = "'
. $GLOBALS['cfg']['Server']['user'] . '" AND ' . PMA_Util::backquote('index') . ' = "pin_text"';

$result = $GLOBALS['dbi']->fetchSingleRow($query);
Expand Down
4 changes: 2 additions & 2 deletions sql/create_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,10 @@ CREATE TABLE IF NOT EXISTS `pma__central_columns` (
--

CREATE TABLE IF NOT EXISTS `pma__designer_settings` (
`user` varchar(64) NOT NULL,
`username` varchar(64) NOT NULL,
`index` varchar(64) NOT NULL,
`value` varchar(64) NOT NULL,
PRIMARY KEY (`user`,`index`)
PRIMARY KEY (`username`,`index`)
)
COMMENT='Settings related to Designer'
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
4 changes: 2 additions & 2 deletions sql/create_tables_drizzle.sql
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,10 @@ CREATE TABLE IF NOT EXISTS `pma__savedsearches` (
--

CREATE TABLE IF NOT EXISTS `pma__designer_settings` (
`user` varchar(64) NOT NULL,
`username` varchar(64) NOT NULL,
`index` varchar(64) NOT NULL,
`value` varchar(64) NOT NULL,
PRIMARY KEY (`user`,`index`)
PRIMARY KEY (`username`,`index`)
)
COMMENT='Settings related to Designer'
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;

0 comments on commit 3ff7a26

Please sign in to comment.