From 159cae41207bf683d85bb19e2de9e567bbc5d809 Mon Sep 17 00:00:00 2001 From: wyd621 Date: Tue, 6 Aug 2013 08:51:09 +0800 Subject: [PATCH] * fix a bug for upgrade. --- tools/minifyfront.php | 2 ++ www/upgrade.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/minifyfront.php b/tools/minifyfront.php index 747ce05f8d..8bf7b82796 100755 --- a/tools/minifyfront.php +++ b/tools/minifyfront.php @@ -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"); diff --git a/www/upgrade.php b/www/upgrade.php index 9f1d1518af..e2bad61d14 100644 --- a/www/upgrade.php +++ b/www/upgrade.php @@ -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();