From d68f2db90463d3d93be96a8531505706aae5618e Mon Sep 17 00:00:00 2001 From: Crack Date: Fri, 18 Jun 2010 20:22:34 +0200 Subject: [PATCH] add warnings if pma_userconfig is not present --- Documentation.html | 20 ++++++++++++++++++++ config.sample.inc.php | 1 + libraries/relation.lib.php | 15 ++++++++++++++- 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/Documentation.html b/Documentation.html index e137953e3..8b809f6b2 100644 --- a/Documentation.html +++ b/Documentation.html @@ -1135,6 +1135,26 @@ CREATE DATABASE,ALTER DATABASE,DROP DATABASE

+
+ $cfg['Servers'][$i]['userconfig'] string +
+
+ Since release 3.4.x phpMyAdmin allows users to set most preferences by themselves + and store them in the database. +

+ + If you don't allow for storing preferences in pmadb, users can + still personalize phpMyAdmin, but settings will be saved in browser's local storage, + or, it is is unavailable, until the end of session. +

+ + To allow the usage of this functionality: + + +
$cfg['Servers'][$i]['designer_coords'] string diff --git a/config.sample.inc.php b/config.sample.inc.php index 575e96562..3a09b56fe 100644 --- a/config.sample.inc.php +++ b/config.sample.inc.php @@ -55,6 +55,7 @@ $cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M'; // $cfg['Servers'][$i]['history'] = 'pma_history'; // $cfg['Servers'][$i]['tracking'] = 'pma_tracking'; // $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords'; +// $cfg['Servers'][$i]['userconfig'] = 'pma_userconfig'; /* Contrib / Swekey authentication */ // $cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey-pma.conf'; diff --git a/libraries/relation.lib.php b/libraries/relation.lib.php index 587a67e20..1a2f8aa5a 100644 --- a/libraries/relation.lib.php +++ b/libraries/relation.lib.php @@ -84,6 +84,8 @@ function PMA_getRelationsParam($verbose = false) * @uses __('Please see the documentation on how to update your column_comments table') * @uses __('SQL history') * @uses __('Designer') + * @uses __('Tracking') + * @uses __('User preferences') * @uses $cfg['Server']['pmadb'] * @uses sprintf() * @uses PMA_printDiagMessageForFeature() @@ -154,6 +156,10 @@ function PMA_printRelationsParamDiagnostic($cfgRelation) PMA_printDiagMessageForFeature(__('Tracking'), 'trackingwork', $messages); + PMA_printDiagMessageForParameter('userconfig', isset($cfgRelation['userconfig']), $messages, 'userconfig'); + + PMA_printDiagMessageForFeature(__('User preferences'), 'userconfigwork', $messages); + echo '' . "\n"; echo '

' . __('Quick steps to setup advanced features:') . '

'; @@ -230,6 +236,7 @@ function PMA__getRelationsParam() $cfgRelation['historywork'] = false; $cfgRelation['trackingwork'] = false; $cfgRelation['designerwork'] = false; + $cfgRelation['userconfigwork'] = false; $cfgRelation['allworks'] = false; $cfgRelation['user'] = null; $cfgRelation['db'] = null; @@ -280,6 +287,8 @@ function PMA__getRelationsParam() $cfgRelation['history'] = $curr_table[0]; } elseif ($curr_table[0] == $GLOBALS['cfg']['Server']['tracking']) { $cfgRelation['tracking'] = $curr_table[0]; + } elseif ($curr_table[0] == $GLOBALS['cfg']['Server']['userconfig']) { + $cfgRelation['userconfig'] = $curr_table[0]; } } // end while PMA_DBI_free_result($tab_rs); @@ -334,6 +343,10 @@ function PMA__getRelationsParam() $cfgRelation['trackingwork'] = true; } + if (isset($cfgRelation['userconfig'])) { + $cfgRelation['userconfigwork'] = true; + } + // we do not absolutely need that the internal relations or the PDF // schema feature be activated if (isset($cfgRelation['designer_coords'])) { @@ -347,7 +360,7 @@ function PMA__getRelationsParam() if ($cfgRelation['relwork'] && $cfgRelation['displaywork'] && $cfgRelation['pdfwork'] && $cfgRelation['commwork'] && $cfgRelation['mimework'] && $cfgRelation['historywork'] - && $cfgRelation['trackingwork'] + && $cfgRelation['trackingwork'] && $cfgRelation['userconfigwork'] && $cfgRelation['bookmarkwork'] && $cfgRelation['designerwork']) { $cfgRelation['allworks'] = true; }