* adjust for upgrade.

This commit is contained in:
wangyidong
2017-09-07 14:34:38 +08:00
parent 41a360d076
commit e7ece74a59
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ if(file_exists('install.php') or file_exists('upgrade.php'))
}
/* If client device is mobile and version is pro, set the default view as mthml. */
if($app->clientDevice == 'mobile' and strpos($config->installedVersion, 'pro') === 0 and $config->default->view == 'html') $config->default->view = 'mhtml';
if($app->clientDevice == 'mobile' and (strpos($config->version, 'pro') === 0 or strpos($config->version, 'biz') === 0) and $config->default->view == 'html') $config->default->view = 'mhtml';
$app->parseRequest();
$common->checkPriv();
+1 -1
View File
@@ -38,7 +38,7 @@ $app->setDebug();
/* Check the installed version is the latest or not. */
$config->installedVersion = $common->loadModel('setting')->getVersion();
if(version_compare($config->version, $config->installedVersion) <= 0) die(header('location: index.php'));
if(($config->version{0} == $config->installedVersion{0} or (is_numeric($config->version{0}) and is_numeric($config->installedVersion{0}))) and version_compare($config->version, $config->installedVersion) <= 0) die(header('location: index.php'));
/* Run it. */
$app->parseRequest();