diff --git a/framework/control.class.php b/framework/control.class.php index 617df9103e..ee0a0c4184 100644 --- a/framework/control.class.php +++ b/framework/control.class.php @@ -33,6 +33,8 @@ class control extends baseControl { parent::__construct($moduleName, $methodName, $appName); + $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') @@ -47,6 +49,24 @@ class control extends baseControl } } + /** + * Go to concept setting page if concept not setted. + * + * @access public + * @return void + */ + public function setConcept() + { + if(isset($this->app->user) and $this->app->user->admin != 'super') return true; + if($this->app->getModuleName() == 'user' and strpos("login,logout", $this->app->getMethodName()) !== false) return true; + + if($this->app->getModuleName() == 'custom' and $this->app->getMethodName() == 'setConcept') return true; + if(!isset($this->config->conceptSetted) and $this->app->getMethodName() != 'concept') + { + $this->locate(helper::createLink('custom', 'concept')); + } + } + /** * 企业版部分功能是从然之合并过来的。然之代码中调用loadModel方法时传递了一个非空的appName,在禅道中会导致错误。 * 调用父类的loadModel方法来避免这个错误。