Skip to content

Commit

Permalink
rfe #1596 Make "Options > Relational" configurable
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Delisle <marc@infomarc.info>
  • Loading branch information
lem9 committed Jan 28, 2015
1 parent 20cf74c commit bdce268
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 3 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Expand Up @@ -25,6 +25,7 @@ phpMyAdmin - ChangeLog
- bug #4720 No error message on Missing extension mbstring
+ rfe #801 Builtin transformations and relations
+ rfe #767 USING BTREE support for HEAP/MEMORY tables
+ rfe #1596 Make "Options > Relational" configurable

4.3.9.0 (not yet released)
- bug #4728 Incorrect headings in routine editor
Expand Down
8 changes: 8 additions & 0 deletions doc/config.rst
Expand Up @@ -1723,6 +1723,14 @@ Browse mode
Defines which action (``double-click`` or ``click``) triggers grid
editing. Can be deactived with the ``disabled`` value.

.. config:option:: $cfg['RelationalDisplay']
:type: string
:default: ``'K'``

Defines the initial behavior for Options > Relational. ``K``, which
is the default, displays the key while ``D`` shows the display column.

.. config:option:: $cfg['SaveCellsAtOnce']
:type: boolean
Expand Down
5 changes: 4 additions & 1 deletion libraries/DisplayResults.class.php
Expand Up @@ -3909,7 +3909,10 @@ public function setConfigParamsForDisplayTable()
$query['relational_display'] = $_REQUEST['relational_display'];
unset($_REQUEST['relational_display']);
} elseif (empty($query['relational_display'])) {
$query['relational_display'] = self::RELATIONAL_KEY;
// The current session value has priority over a
// change via Settings; this change will be apparent
// starting from the next session
$query['relational_display'] = $GLOBALS['cfg']['RelationalDisplay'];
}

if (PMA_isValid(
Expand Down
13 changes: 13 additions & 0 deletions libraries/config.default.php
Expand Up @@ -1102,6 +1102,19 @@
*/
$cfg['GridEditing'] ='double-click';

/**
* Options > Relational display
*
* Possible values:
* 'K' for key value
* 'D' for display column
*
* @global string $cfg['RelationalDisplay']
*
*/

$cfg['RelationalDisplay'] = 'K';


/*******************************************************************************
* In edit mode...
Expand Down
4 changes: 4 additions & 0 deletions libraries/config.values.php
Expand Up @@ -94,6 +94,10 @@
'double-click' => __('Double click'),
'disabled' => __('Disabled'),
);
$cfg_db['RelationalDisplay'] = array(
'K' => __('key'),
'D' => __('display column')
);
$cfg_db['DefaultTabServer'] = array(
'index.php', // the welcome page (recommended for multiuser setups)
'server_databases.php', // list of databases
Expand Down
2 changes: 2 additions & 0 deletions libraries/config/messages.inc.php
Expand Up @@ -532,6 +532,8 @@
$strConfigRepeatCells_name = __('Repeat headers');
$strConfigRestoreDefaultValue = __('Restore default value');
$strConfigGridEditing_name = __('Grid editing: trigger action');
$strConfigRelationalDisplay_name = __('Relational display');
$strConfigRelationalDisplay_desc = __('For display Options');
$strConfigSaveCellsAtOnce_name = __('Grid editing: save all edited cells at once');
$strConfigSaveDir_desc = __('Directory where exports can be saved on server.');
$strConfigSaveDir_name = __('Save directory');
Expand Down
3 changes: 2 additions & 1 deletion libraries/config/setup.forms.php
Expand Up @@ -212,7 +212,8 @@
'LimitChars',
'RowActionLinks',
'TablePrimaryKeyOrder',
'RememberSorting');
'RememberSorting',
'RelationalDisplay');
$forms['Main_panel']['Edit'] = array(
'ProtectBinary',
'ShowFunctionFields',
Expand Down
3 changes: 2 additions & 1 deletion libraries/config/user_preferences.forms.php
Expand Up @@ -120,7 +120,8 @@
'LimitChars',
'RowActionLinks',
'TablePrimaryKeyOrder',
'RememberSorting');
'RememberSorting',
'RelationalDisplay');
$forms['Main_panel']['Edit'] = array(
'ProtectBinary',
'ShowFunctionFields',
Expand Down

0 comments on commit bdce268

Please sign in to comment.