From 21b36247ffc4f13aeecd06d94421eca9fc5ca07d Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 22 Nov 2019 15:39:44 +0800 Subject: [PATCH] * code for setConcept. --- framework/control.class.php | 5 +++-- framework/router.class.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/framework/control.class.php b/framework/control.class.php index ee0a0c4184..60175dcd13 100644 --- a/framework/control.class.php +++ b/framework/control.class.php @@ -33,7 +33,7 @@ class control extends baseControl { parent::__construct($moduleName, $methodName, $appName); - $this->setConcept(); + if(!defined('IN_INSTALL') and !defined('IN_UPGRADE')) $this->setConcept(); if(!isset($this->config->bizVersion)) return false; /* Code for task #9224. Set requiredFields for workflow. */ @@ -57,8 +57,9 @@ class control extends baseControl */ public function setConcept() { - if(isset($this->app->user) and $this->app->user->admin != 'super') return true; + if(empty($this->app->user->admin)) return true; if($this->app->getModuleName() == 'user' and strpos("login,logout", $this->app->getMethodName()) !== false) return true; + if($this->app->getModuleName() == 'my' and $this->app->getMethodName() == 'changepassword') return true; if($this->app->getModuleName() == 'custom' and $this->app->getMethodName() == 'setConcept') return true; if(!isset($this->config->conceptSetted) and $this->app->getMethodName() != 'concept') diff --git a/framework/router.class.php b/framework/router.class.php index cb4898851b..01daa13d16 100755 --- a/framework/router.class.php +++ b/framework/router.class.php @@ -95,7 +95,7 @@ class router extends baseRouter /* Set productCommon and projectCommon for flow. */ if($moduleName == 'common') { - $productProject = false; + $productProject = $storyRequirement = $hourPoint = false; if($this->dbh and !empty($this->config->db->name)) { global $config;