Skip to content

Commit

Permalink
add warnings if pma_userconfig is not present
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrp committed Jun 18, 2010
1 parent 114869e commit d68f2db
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
20 changes: 20 additions & 0 deletions Documentation.html
Expand Up @@ -1135,6 +1135,26 @@ <h2 id="config">Configuration</h2>
<br/><br/>
</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">
<span id="cfg_Servers_designer_coords">$cfg['Servers'][$i]['designer_coords']</span> string
Expand Down
1 change: 1 addition & 0 deletions config.sample.inc.php
Expand Up @@ -55,6 +55,7 @@
// $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';

Expand Down
15 changes: 14 additions & 1 deletion libraries/relation.lib.php
Expand Up @@ -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()
Expand Down Expand Up @@ -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 '</table>' . "\n";

echo '<p>' . __('Quick steps to setup advanced features:') . '</p>';
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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'])) {
Expand All @@ -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;
}
Expand Down

0 comments on commit d68f2db

Please sign in to comment.