Make version check configurable.

This commit is contained in:
Michal Čihař
2011-02-02 14:32:46 +01:00
parent 34546681a8
commit 42c8e65139
7 changed files with 21 additions and 2 deletions

View File

@@ -1301,6 +1301,10 @@ CREATE DATABASE,ALTER DATABASE,DROP DATABASE</pre>
for example, the Designer feature is Ajax-only so this directive for example, the Designer feature is Ajax-only so this directive
does not apply to it.</dd> does not apply to it.</dd>
<dt id="cfg_VersionCheck">$cfg['VersionCheck'] boolean</dt>
<dd>Enables check for latest versions using javascript on main phpMyAdmin
page.</dd>
<dt id="cfg_MaxTableList">$cfg['MaxTableList'] integer</dt> <dt id="cfg_MaxTableList">$cfg['MaxTableList'] integer</dt>
<dd>The maximum number of table names to be displayed in the <dd>The maximum number of table names to be displayed in the
main panel's list (except on the Export page). This limit is also enforced in the navigation panel main panel's list (except on the Export page). This limit is also enforced in the navigation panel

View File

@@ -2466,7 +2466,7 @@ $(document).ready(function() {
/** /**
* Load version information asynchronously. * Load version information asynchronously.
*/ */
if ($('#li_pma_version').length > 0) { if ($('.jsversioncheck').length > 0) {
(function() { (function() {
var s = document.createElement('script'); var s = document.createElement('script');
s.type = 'text/javascript'; s.type = 'text/javascript';

View File

@@ -494,6 +494,13 @@ $cfg['ServerDefault'] = 1;
*/ */
$cfg['AjaxEnable'] = true; $cfg['AjaxEnable'] = true;
/**
* whether version check is active
*
* @global boolean $cfg['VersionCheck']
*/
$cfg['VersionCheck'] = true;
/** /**
* maximum number of db's displayed in left frame and database list * maximum number of db's displayed in left frame and database list
* *

View File

@@ -495,6 +495,8 @@ $strConfigUserprefsDeveloperTab_name = __('Enable the Developer tab in settings'
$strConfigVerboseMultiSubmit_desc = __('Show affected rows of each statement on multiple-statement queries. See libraries/import.lib.php for defaults on how many queries a statement may contain.'); $strConfigVerboseMultiSubmit_desc = __('Show affected rows of each statement on multiple-statement queries. See libraries/import.lib.php for defaults on how many queries a statement may contain.');
$strConfigVerboseMultiSubmit_name = __('Verbose multiple statements'); $strConfigVerboseMultiSubmit_name = __('Verbose multiple statements');
$strConfigVersionCheckLink = __('Check for latest version'); $strConfigVersionCheckLink = __('Check for latest version');
$strConfigVersionCheck_desc = __('Enables check for latest version on main phpMyAdmin page');
$strConfigVersionCheck_name = __('Version check');
$strConfigZipDump_desc = __('Enable [a@http://en.wikipedia.org/wiki/ZIP_(file_format)]ZIP[/a] compression for import and export operations'); $strConfigZipDump_desc = __('Enable [a@http://en.wikipedia.org/wiki/ZIP_(file_format)]ZIP[/a] compression for import and export operations');
$strConfigZipDump_name = __('ZIP'); $strConfigZipDump_name = __('ZIP');

View File

@@ -121,6 +121,7 @@ $forms['Features']['Developer'] = array(
'DBG/sql'); 'DBG/sql');
$forms['Features']['Other_core_settings'] = array( $forms['Features']['Other_core_settings'] = array(
'AjaxEnable', 'AjaxEnable',
'VersionCheck',
'NaturalOrder', 'NaturalOrder',
'InitialSlidersState', 'InitialSlidersState',
'ErrorIconic', 'ErrorIconic',

View File

@@ -23,6 +23,7 @@
$forms = array(); $forms = array();
$forms['Features']['General'] = array( $forms['Features']['General'] = array(
'AjaxEnable', 'AjaxEnable',
'VersionCheck',
'NaturalOrder', 'NaturalOrder',
'InitialSlidersState', 'InitialSlidersState',
'ErrorIconic', 'ErrorIconic',

View File

@@ -209,7 +209,11 @@ if ($GLOBALS['cfg']['ShowServerInfo'] || $GLOBALS['cfg']['ShowPhpInfo']) {
echo '<div class="group">'; echo '<div class="group">';
echo '<h2>phpMyAdmin</h2>'; echo '<h2>phpMyAdmin</h2>';
echo '<ul>'; echo '<ul>';
PMA_printListItem(__('Version information') . ': ' . PMA_VERSION, 'li_pma_version'); $clas = null;
if ($GLOBALS['cfg']['VersionCheck']) {
$class = 'jsversioncheck';
}
PMA_printListItem(__('Version information') . ': ' . PMA_VERSION, 'li_pma_version', null, null, null, null, $class);
PMA_printListItem(__('Documentation'), 'li_pma_docs', 'Documentation.html', null, '_blank'); PMA_printListItem(__('Documentation'), 'li_pma_docs', 'Documentation.html', null, '_blank');
PMA_printListItem(__('Wiki'), 'li_pma_wiki', PMA_linkURL('http://wiki.phpmyadmin.net/'), null, '_blank'); PMA_printListItem(__('Wiki'), 'li_pma_wiki', PMA_linkURL('http://wiki.phpmyadmin.net/'), null, '_blank');