* fix a bug for upgrade.

This commit is contained in:
wyd621
2013-08-06 08:51:09 +08:00
parent e8c1d58782
commit 159cae4120
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -21,6 +21,7 @@ $jsFiles[] = $jqueryRoot . 'datepicker/date.js';
$jsFiles[] = $jqueryRoot . 'datepicker/min.js';
$jsFiles[] = $jqueryRoot . 'alert/min.js';
$jsFiles[] = $jqueryRoot . 'colorize/min.js';
$jsFiles[] = $jqueryRoot . 'dropmenu/dropmenu.js';
/* Combine these js files. */
$allJSFile = $jsRoot . 'all.js';
@@ -70,6 +71,7 @@ foreach($langs as $lang)
$cssCode .= file_get_contents($themeRoot . 'default/treeview.css');
$cssCode .= file_get_contents($themeRoot . 'default/datepicker.css');
$cssCode .= file_get_contents($themeRoot . 'default/alert.css');
$cssCode .= file_get_contents($themeRoot . 'default/dropmenu.css');
/* Css file for current lang and current them. */
$cssCode .= file_get_contents($themeRoot . "lang/$lang.css");
+1 -1
View File
@@ -37,7 +37,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(!$_SERVER['HTTP_X_REQUESTED_WITH'] and version_compare($config->version, $config->installedVersion) <= 0) die(header('location: index.php'));
/* Run it. */
$app->parseRequest();