diff --git a/doc/config.rst b/doc/config.rst index b65799bb01..7d484284fd 100644 --- a/doc/config.rst +++ b/doc/config.rst @@ -1111,8 +1111,8 @@ Generic settings :type: boolean :default: true - Enables check for latest versions using javascript on main phpMyAdmin - page. + Enables check for latest versions using JavaScript on the main phpMyAdmin + page or by directly accessing :file:`version_check.php`. .. note:: @@ -1693,6 +1693,15 @@ Main panel Defines whether to display informations about the current Git revision (if applicable) on the main panel. +.. config:option:: $cfg['MysqlMinVersion'] + + :type: array + + Defines the minimum supported MySQL version. The default is chosen + by the phpMyAdmin team; however this directive was asked by a developer + of the Plesk control panel to ease integration with older MySQL servers + (where most of the phpMyAdmin features work). + Database structure ------------------ diff --git a/libraries/Util.class.php b/libraries/Util.class.php index 7a4ef957bd..51f3f3f5dd 100644 --- a/libraries/Util.class.php +++ b/libraries/Util.class.php @@ -4491,6 +4491,10 @@ class PMA_Util */ public static function getLatestVersion() { + if (!$GLOBALS['cfg']['VersionCheck']) { + return new stdClass(); + } + // wait 3s at most for server response, it's enough to get information // from a working server $connection_timeout = 3; diff --git a/libraries/common.inc.php b/libraries/common.inc.php index a8412dd446..7d795a480a 100644 --- a/libraries/common.inc.php +++ b/libraries/common.inc.php @@ -1027,10 +1027,10 @@ if (! defined('PMA_MINIMUM_COMMON')) { /* Log success */ PMA_logUser($cfg['Server']['user']); - if (PMA_MYSQL_INT_VERSION < 50500) { + if (PMA_MYSQL_INT_VERSION < $cfg['MysqlMinVersion']['internal']) { PMA_fatalError( __('You should upgrade to %s %s or later.'), - array('MySQL', '5.5.0') + array('MySQL', $cfg['MysqlMinVersion']['human']) ); } diff --git a/libraries/config.default.php b/libraries/config.default.php index 06cb63ebad..79cb5390b9 100644 --- a/libraries/config.default.php +++ b/libraries/config.default.php @@ -3065,4 +3065,15 @@ $cfg['maxRowPlotLimit'] = 500; */ $cfg['ShowGitRevision'] = true; +/** + * MySQL minimal version required + * + * @global array $cfg['MysqlMinVersion'] + */ +$cfg['MysqlMinVersion'] = array( + 'internal' => 50500, + 'human' => '5.5.0' +); + + ?> diff --git a/libraries/navigation/NavigationHeader.class.php b/libraries/navigation/NavigationHeader.class.php index 9d9ec76ab3..a5023e4a27 100644 --- a/libraries/navigation/NavigationHeader.class.php +++ b/libraries/navigation/NavigationHeader.class.php @@ -9,6 +9,9 @@ if (! defined('PHPMYADMIN')) { exit; } +require_once 'libraries/Template.class.php'; +use PMA\Template; + /** * This class renders the logo, links, server selection, * which are then displayed at the top of the navigation panel @@ -73,11 +76,10 @@ class PMA_NavigationHeader */ private function _logo() { - $retval = ''; // display Logo, depending on $GLOBALS['cfg']['NavigationDisplayLogo'] if (!$GLOBALS['cfg']['NavigationDisplayLogo']) { - $retval .= ''; - return $retval; + return Template::get('logo') + ->render(array('displayLogo' => false)); } $logo = 'phpMyAdmin'; @@ -88,44 +90,57 @@ class PMA_NavigationHeader $logo = ''; } - $retval .= '