* Optimize code.

This commit is contained in:
wangyuting2
2022-10-28 08:05:21 +00:00
parent 46aafd792c
commit b7ebe4ee2b
5 changed files with 33 additions and 11 deletions
+10 -4
View File
@@ -774,10 +774,16 @@ class blockModel extends model
*/
public function getAssignToMeParams()
{
$hasWaterfall = strpos(",{$this->config->disabledFeatures},", ',waterfall,') === false;
$hasIssue = strpos(",{$this->config->disabledFeatures},", ',scrumIssue,') === false or $hasWaterfall;
$hasRisk = strpos(",{$this->config->disabledFeatures},", ',scrumRisk,') === false or $hasWaterfall;
$hasMeeting = strpos(",{$this->config->disabledFeatures},", ',scrumMeeting,') === false or $hasWaterfall;
$hasWaterfall = strpos(",{$this->config->disabledFeatures},", ',waterfall,') === false;
$hasScrumIssue = strpos(",{$this->config->disabledFeatures},", ',scrumIssue,') === false;
$hasScrumRisk = strpos(",{$this->config->disabledFeatures},", ',scrumRisk,') === false;
$hasScrumMeeting = strpos(",{$this->config->disabledFeatures},", ',scrumMeeting,') === false;
$hasWaterfallIssue = (strpos(",{$this->config->disabledFeatures},", ',waterfallIssue,') === false and $hasWaterfall);
$hasWaterfallRisk = (strpos(",{$this->config->disabledFeatures},", ',waterfallRisk,') === false and $hasWaterfall);
$hasWaterfallMeeting = (strpos(",{$this->config->disabledFeatures},", ',waterfallMeeting,') === false and $hasWaterfall);
$hasIssue = ($hasScrumIssue or $hasWaterfallIssue);
$hasRisk = ($hasScrumRisk or $hasWaterfallRisk);
$hasMeeting = ($hasScrumMeeting or $hasWaterfallMeeting);
$params = new stdclass();
$params->todoCount['name'] = $this->lang->block->todoCount;