add warnings if pma_userconfig is not present

This commit is contained in:
Crack
2010-06-18 20:22:34 +02:00
parent 114869eb7a
commit d68f2db904
3 changed files with 35 additions and 1 deletions

View File

@@ -1135,6 +1135,26 @@ CREATE DATABASE,ALTER DATABASE,DROP DATABASE</pre>
<br/><br/> <br/><br/>
</dd> </dd>
<dt id="userconfig">
<span id="cfg_Servers_userconfig">$cfg['Servers'][$i]['userconfig']</span> string
</dt>
<dd>
Since release 3.4.x phpMyAdmin allows users to set most preferences by themselves
and store them in the database.
<br /><br />
If you don't allow for storing preferences in <a href="#pmadb">pmadb</a>, 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.
<br /><br />
To allow the usage of this functionality:
<ul>
<li>set up <a href="#pmadb">pmadb</a> and the linked-tables infrastructure</li>
<li>put the table name in <tt>$cfg['Servers'][$i]['userconfig']</tt></li>
</ul>
</dd>
<dt id="designer_coords"> <dt id="designer_coords">
<span id="cfg_Servers_designer_coords">$cfg['Servers'][$i]['designer_coords']</span> string <span id="cfg_Servers_designer_coords">$cfg['Servers'][$i]['designer_coords']</span> string

View File

@@ -55,6 +55,7 @@ $cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
// $cfg['Servers'][$i]['history'] = 'pma_history'; // $cfg['Servers'][$i]['history'] = 'pma_history';
// $cfg['Servers'][$i]['tracking'] = 'pma_tracking'; // $cfg['Servers'][$i]['tracking'] = 'pma_tracking';
// $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords'; // $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
// $cfg['Servers'][$i]['userconfig'] = 'pma_userconfig';
/* Contrib / Swekey authentication */ /* Contrib / Swekey authentication */
// $cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey-pma.conf'; // $cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey-pma.conf';

View File

@@ -84,6 +84,8 @@ function PMA_getRelationsParam($verbose = false)
* @uses __('Please see the documentation on how to update your column_comments table') * @uses __('Please see the documentation on how to update your column_comments table')
* @uses __('SQL history') * @uses __('SQL history')
* @uses __('Designer') * @uses __('Designer')
* @uses __('Tracking')
* @uses __('User preferences')
* @uses $cfg['Server']['pmadb'] * @uses $cfg['Server']['pmadb']
* @uses sprintf() * @uses sprintf()
* @uses PMA_printDiagMessageForFeature() * @uses PMA_printDiagMessageForFeature()
@@ -154,6 +156,10 @@ function PMA_printRelationsParamDiagnostic($cfgRelation)
PMA_printDiagMessageForFeature(__('Tracking'), 'trackingwork', $messages); PMA_printDiagMessageForFeature(__('Tracking'), 'trackingwork', $messages);
PMA_printDiagMessageForParameter('userconfig', isset($cfgRelation['userconfig']), $messages, 'userconfig');
PMA_printDiagMessageForFeature(__('User preferences'), 'userconfigwork', $messages);
echo '</table>' . "\n"; echo '</table>' . "\n";
echo '<p>' . __('Quick steps to setup advanced features:') . '</p>'; echo '<p>' . __('Quick steps to setup advanced features:') . '</p>';
@@ -230,6 +236,7 @@ function PMA__getRelationsParam()
$cfgRelation['historywork'] = false; $cfgRelation['historywork'] = false;
$cfgRelation['trackingwork'] = false; $cfgRelation['trackingwork'] = false;
$cfgRelation['designerwork'] = false; $cfgRelation['designerwork'] = false;
$cfgRelation['userconfigwork'] = false;
$cfgRelation['allworks'] = false; $cfgRelation['allworks'] = false;
$cfgRelation['user'] = null; $cfgRelation['user'] = null;
$cfgRelation['db'] = null; $cfgRelation['db'] = null;
@@ -280,6 +287,8 @@ function PMA__getRelationsParam()
$cfgRelation['history'] = $curr_table[0]; $cfgRelation['history'] = $curr_table[0];
} elseif ($curr_table[0] == $GLOBALS['cfg']['Server']['tracking']) { } elseif ($curr_table[0] == $GLOBALS['cfg']['Server']['tracking']) {
$cfgRelation['tracking'] = $curr_table[0]; $cfgRelation['tracking'] = $curr_table[0];
} elseif ($curr_table[0] == $GLOBALS['cfg']['Server']['userconfig']) {
$cfgRelation['userconfig'] = $curr_table[0];
} }
} // end while } // end while
PMA_DBI_free_result($tab_rs); PMA_DBI_free_result($tab_rs);
@@ -334,6 +343,10 @@ function PMA__getRelationsParam()
$cfgRelation['trackingwork'] = true; $cfgRelation['trackingwork'] = true;
} }
if (isset($cfgRelation['userconfig'])) {
$cfgRelation['userconfigwork'] = true;
}
// we do not absolutely need that the internal relations or the PDF // we do not absolutely need that the internal relations or the PDF
// schema feature be activated // schema feature be activated
if (isset($cfgRelation['designer_coords'])) { if (isset($cfgRelation['designer_coords'])) {
@@ -347,7 +360,7 @@ function PMA__getRelationsParam()
if ($cfgRelation['relwork'] && $cfgRelation['displaywork'] if ($cfgRelation['relwork'] && $cfgRelation['displaywork']
&& $cfgRelation['pdfwork'] && $cfgRelation['commwork'] && $cfgRelation['pdfwork'] && $cfgRelation['commwork']
&& $cfgRelation['mimework'] && $cfgRelation['historywork'] && $cfgRelation['mimework'] && $cfgRelation['historywork']
&& $cfgRelation['trackingwork'] && $cfgRelation['trackingwork'] && $cfgRelation['userconfigwork']
&& $cfgRelation['bookmarkwork'] && $cfgRelation['designerwork']) { && $cfgRelation['bookmarkwork'] && $cfgRelation['designerwork']) {
$cfgRelation['allworks'] = true; $cfgRelation['allworks'] = true;
} }