diff --git a/framework/control.class.php b/framework/control.class.php index eec2546cbb..4240389815 100644 --- a/framework/control.class.php +++ b/framework/control.class.php @@ -33,11 +33,12 @@ class control extends baseControl { parent::__construct($moduleName, $methodName, $appName); - if(!defined('IN_INSTALL') and !defined('IN_UPGRADE')) $this->setConcept(); + if(defined('IN_USE') or (defined('RUN_MODE') and RUN_MODE == 'api')) $this->setConcept(); if(!isset($this->config->bizVersion)) return false; + /* Code for task #9224. Set requiredFields for workflow. */ - if($this->dbh and $this->moduleName != 'upgrade' and $this->moduleName != 'install' and !defined('IN_INSTALL') and !defined('IN_UPGRADE')) + if($this->dbh or defined('IN_USE') or (defined('RUN_MODE') and RUN_MODE == 'api')) { $this->checkRequireFlowField(); diff --git a/module/bug/model.php b/module/bug/model.php index 86f2646022..d3c9e4a1ba 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -2845,6 +2845,13 @@ class bugModel extends model return array($toList, $ccList); } + /** + * Summary + * + * @param array $bugs + * @access public + * @return string + */ public function summary($bugs) { $unresolved = 0; diff --git a/module/common/view/header.lite.html.php b/module/common/view/header.lite.html.php index 6879c23f25..54dbcfd32c 100755 --- a/module/common/view/header.lite.html.php +++ b/module/common/view/header.lite.html.php @@ -46,7 +46,7 @@ $onlybody = zget($_GET, 'onlybody', 'no'); } if($this->app->getViewType() == 'xhtml') css::import($defaultTheme . 'x.style.css'); - if(!defined('IN_INSTALL') and commonModel::isTutorialMode()) + if(defined('IN_USE') and commonModel::isTutorialMode()) { $wizardModule = defined('WIZARD_MODULE') ? WIZARD_MODULE : $this->moduleName; $wizardMethod = defined('WIZARD_METHOD') ? WIZARD_METHOD : $this->methodName; diff --git a/module/user/model.php b/module/user/model.php index bec817f37a..b3cf97a18c 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -680,7 +680,7 @@ class userModel extends model } /* code for bug #2729. */ - if(!defined('RUN_MODE') or RUN_MODE != 'xuanxuan') $this->dao->update(TABLE_USER)->set('visits = visits + 1')->set('ip')->eq($ip)->set('last')->eq($last)->where('account')->eq($account)->exec(); + if(defined('IN_USE')) $this->dao->update(TABLE_USER)->set('visits = visits + 1')->set('ip')->eq($ip)->set('last')->eq($last)->where('account')->eq($account)->exec(); /* Create cycle todo in login. */ $todoList = $this->dao->select('*')->from(TABLE_TODO)->where('cycle')->eq(1)->andWhere('account')->eq($user->account)->fetchAll('id'); diff --git a/www/index.php b/www/index.php index 4b751cb20d..4c1ef159af 100644 --- a/www/index.php +++ b/www/index.php @@ -13,6 +13,7 @@ */ /* Set the error reporting. */ error_reporting(0); +define('IN_USE', true); /* Start output buffer. */ ob_start();