From daed4773de5c7adcf05a190835ce273b37c39928 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 17 Jan 2017 14:08:17 +0800 Subject: [PATCH] * revert version. --- config/config.php | 2 +- www/index.php | 2 +- www/upgrade.php.tmp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/config.php b/config/config.php index 57168d7e52..1c264e9944 100644 --- a/config/config.php +++ b/config/config.php @@ -17,7 +17,7 @@ if(!function_exists('getWebRoot')){function getWebRoot(){}} /* Basic settings. */ $config = new config(); -$config->version = '9.0.stable'; // The version of zentaopms. Don't change it. +$config->version = '9.0'; // The version of zentaopms. Don't change it. $config->charset = 'UTF-8'; // The charset of zentaopms. $config->cookieLife = time() + 2592000; // The cookie life time. $config->timezone = 'Asia/Shanghai'; // The time zone setting, for more see http://www.php.net/manual/en/timezones.php diff --git a/www/index.php b/www/index.php index f0dc5345ce..cf6ebaa69b 100644 --- a/www/index.php +++ b/www/index.php @@ -40,7 +40,7 @@ if(isset($_GET['mode']) and $_GET['mode'] == 'getconfig') die(helper::removeUTF8 /* Check for need upgrade. */ $config->installedVersion = $common->loadModel('setting')->getVersion(); -if(!(!is_numeric($config->version{0}) and $config->version{0} != $config->installedVersion{0}) and $config->version > $config->installedVersion) die(header('location: upgrade.php')); +if(!(!is_numeric($config->version{0}) and $config->version{0} != $config->installedVersion{0}) and version_compare($config->version, $config->installedVersion, '>')) die(header('location: upgrade.php')); /* Remove install.php and upgrade.php. */ if(file_exists('install.php') or file_exists('upgrade.php')) diff --git a/www/upgrade.php.tmp b/www/upgrade.php.tmp index a44fce2c1e..b9060a929a 100644 --- a/www/upgrade.php.tmp +++ b/www/upgrade.php.tmp @@ -38,7 +38,7 @@ $app->setDebug(); /* Check the installed version is the latest or not. */ $config->installedVersion = $common->loadModel('setting')->getVersion(); -if($config->version <= $config->installedVersion) die(header('location: index.php')); +if(version_compare($config->version, $config->installedVersion) <= 0) die(header('location: index.php')); /* Run it. */ $app->parseRequest();