diff --git a/module/admin/control.php b/module/admin/control.php index 593580d84e..3d2d0cbe16 100644 --- a/module/admin/control.php +++ b/module/admin/control.php @@ -254,6 +254,7 @@ class admin extends control } $closedFeatures = rtrim($closedFeatures, ','); $this->loadModel('setting')->setItem('system.common.closedFeatures', $closedFeatures); + $this->loadModel('custom')->processMeasrecordCron(); $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'top')); } $this->view->title = $this->lang->admin->setModuleIndex; diff --git a/module/admin/lang/zh-cn.php b/module/admin/lang/zh-cn.php index 449ce0ec6b..95a21c0810 100644 --- a/module/admin/lang/zh-cn.php +++ b/module/admin/lang/zh-cn.php @@ -100,7 +100,7 @@ $lang->admin->setModule->practicelib = '最佳实践库'; $lang->admin->setModule->componentlib = '组件库'; $lang->admin->setModule->devops = 'DevOps'; $lang->admin->setModule->kanban = '通用看板'; -$lang->admin->setModule->oa = '办公'; +$lang->admin->setModule->OA = '办公'; $lang->admin->setModule->deploy = '运维'; $lang->admin->setModule->traincourse = '学堂'; diff --git a/module/custom/model.php b/module/custom/model.php index fdab377b44..b0836a4f45 100644 --- a/module/custom/model.php +++ b/module/custom/model.php @@ -907,7 +907,7 @@ class customModel extends model $disabledFeatures = rtrim($disabledFeatures, ','); $this->loadModel('setting')->setItem('system.common.disabledFeatures', $disabledFeatures); - $this->processMeasrecordCron($disabledFeatures); + $this->processMeasrecordCron(); } /** @@ -1057,17 +1057,21 @@ class customModel extends model /** * Process measrecord cron. * - * @param string $disabledFeatures * @access public * @return void */ - public function processMeasrecordCron($disabledFeatures) + public function processMeasrecordCron() { - $cronStatus = 'normal'; + $this->loadModel('setting'); + $closedFeatures = $this->setting->getItem('owner=system&module=common§ion=&key=closedFeatures'); + $disabledFeatures = $this->setting->getItem('owner=system&module=common§ion=&key=disabledFeatures'); + $disabledFeatures = $disabledFeatures . ',' . $closedFeatures; - $hasWaterfall = strpos(",{$this->config->disabledFeatures},", ',waterfall,') === false; - $hasScrumMeasrecord = strpos(",{$this->config->disabledFeatures},", ',scrumMeasrecord,') === false; - $hasWaterfallMeasrecord = (strpos(",{$this->config->disabledFeatures},", ',waterfallMeasrecord,') === false and $hasWaterfall); + $hasWaterfall = strpos(",{$disabledFeatures},", ',waterfall,') === false; + $hasScrumMeasrecord = strpos(",{$disabledFeatures},", ',scrumMeasrecord,') === false; + $hasWaterfallMeasrecord = (strpos(",{$disabledFeatures},", ',waterfallMeasrecord,') === false and $hasWaterfall); + + $cronStatus = 'normal'; if(!$hasScrumMeasrecord and !$hasWaterfallMeasrecord) $cronStatus = 'stop'; $this->loadModel('cron'); diff --git a/module/my/lang/de.php b/module/my/lang/de.php index 8ed268a36e..017098731c 100644 --- a/module/my/lang/de.php +++ b/module/my/lang/de.php @@ -101,7 +101,7 @@ $lang->my->auditMenu->audit->story = 'Story'; $lang->my->auditMenu->audit->testcase = 'Case'; if($config->edition == 'max' and strpos(",$config->disabledFeatures,", ',waterfall,') === false) $lang->my->auditMenu->audit->project = 'Project'; if($config->edition != 'open') $lang->my->auditMenu->audit->feedback = 'Feedback'; -if($config->edition != 'open' and strpos(",$config->disabledFeatures,", ',otherOa,') === false) $lang->my->auditMenu->audit->oa = 'OA'; +if($config->edition != 'open' and strpos(",$config->disabledFeatures,", ',otherOA,') === false) $lang->my->auditMenu->audit->oa = 'OA'; $lang->my->contributeMenu = new stdclass(); $lang->my->contributeMenu->audit = new stdclass(); diff --git a/module/my/lang/en.php b/module/my/lang/en.php index 8ed268a36e..017098731c 100644 --- a/module/my/lang/en.php +++ b/module/my/lang/en.php @@ -101,7 +101,7 @@ $lang->my->auditMenu->audit->story = 'Story'; $lang->my->auditMenu->audit->testcase = 'Case'; if($config->edition == 'max' and strpos(",$config->disabledFeatures,", ',waterfall,') === false) $lang->my->auditMenu->audit->project = 'Project'; if($config->edition != 'open') $lang->my->auditMenu->audit->feedback = 'Feedback'; -if($config->edition != 'open' and strpos(",$config->disabledFeatures,", ',otherOa,') === false) $lang->my->auditMenu->audit->oa = 'OA'; +if($config->edition != 'open' and strpos(",$config->disabledFeatures,", ',otherOA,') === false) $lang->my->auditMenu->audit->oa = 'OA'; $lang->my->contributeMenu = new stdclass(); $lang->my->contributeMenu->audit = new stdclass(); diff --git a/module/my/lang/fr.php b/module/my/lang/fr.php index 8ed268a36e..017098731c 100644 --- a/module/my/lang/fr.php +++ b/module/my/lang/fr.php @@ -101,7 +101,7 @@ $lang->my->auditMenu->audit->story = 'Story'; $lang->my->auditMenu->audit->testcase = 'Case'; if($config->edition == 'max' and strpos(",$config->disabledFeatures,", ',waterfall,') === false) $lang->my->auditMenu->audit->project = 'Project'; if($config->edition != 'open') $lang->my->auditMenu->audit->feedback = 'Feedback'; -if($config->edition != 'open' and strpos(",$config->disabledFeatures,", ',otherOa,') === false) $lang->my->auditMenu->audit->oa = 'OA'; +if($config->edition != 'open' and strpos(",$config->disabledFeatures,", ',otherOA,') === false) $lang->my->auditMenu->audit->oa = 'OA'; $lang->my->contributeMenu = new stdclass(); $lang->my->contributeMenu->audit = new stdclass(); diff --git a/module/my/lang/zh-cn.php b/module/my/lang/zh-cn.php index fa9d49cc76..8b4774de0d 100644 --- a/module/my/lang/zh-cn.php +++ b/module/my/lang/zh-cn.php @@ -101,7 +101,7 @@ $lang->my->auditMenu->audit->story = '需求'; $lang->my->auditMenu->audit->testcase = '用例'; if($config->edition == 'max' and strpos(",$config->disabledFeatures,", ',waterfall,') === false) $lang->my->auditMenu->audit->project = '项目'; if($config->edition != 'open') $lang->my->auditMenu->audit->feedback = '反馈'; -if($config->edition != 'open' and strpos(",$config->disabledFeatures,", ',otherOa,') === false) $lang->my->auditMenu->audit->oa = '办公'; +if($config->edition != 'open' and strpos(",$config->disabledFeatures,", ',otherOA,') === false) $lang->my->auditMenu->audit->oa = '办公'; $lang->my->contributeMenu = new stdclass(); $lang->my->contributeMenu->audit = new stdclass();