From d384a6b4327e6ea6f057720f3d4edba12761319d Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Mon, 15 Jun 2015 08:05:17 +0600 Subject: [PATCH] Ability to contol the minimal MySQL version via config. Signed-off-by: Alexei Yuzhakov --- libraries/common.inc.php | 4 ++-- libraries/config.default.php | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) 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' +); + + ?>