* Fix bug for review code.

This commit is contained in:
wangyuting2
2022-11-03 07:16:01 +00:00
parent 3a204c4a37
commit b4f6b346b8
2 changed files with 12 additions and 7 deletions
+1
View File
@@ -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;
+11 -7
View File
@@ -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&section=&key=closedFeatures');
$disabledFeatures = $this->setting->getItem('owner=system&module=common&section=&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');