* Optimize code for review code.
This commit is contained in:
@@ -1752,16 +1752,9 @@ class block extends control
|
||||
*/
|
||||
public function printAssignToMeBlock($longBlock = true)
|
||||
{
|
||||
$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);
|
||||
$hasIssue = helper::hasFeature('issue');
|
||||
$hasRisk = helper::hasFeature('risk');
|
||||
$hasMeeting = helper::hasFeature('meeting');
|
||||
|
||||
$hasViewPriv = array();
|
||||
if(common::hasPriv('todo', 'view')) $hasViewPriv['todo'] = true;
|
||||
|
||||
+3
-14
@@ -774,17 +774,6 @@ class blockModel extends model
|
||||
*/
|
||||
public function getAssignToMeParams()
|
||||
{
|
||||
$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;
|
||||
$params->todoCount['default'] = 20;
|
||||
@@ -800,21 +789,21 @@ class blockModel extends model
|
||||
|
||||
if($this->config->edition == 'max')
|
||||
{
|
||||
if($hasRisk)
|
||||
if(helper::hasFeature('risk'))
|
||||
{
|
||||
$params->riskCount['name'] = $this->lang->block->riskCount;
|
||||
$params->riskCount['default'] = 20;
|
||||
$params->riskCount['control'] = 'input';
|
||||
}
|
||||
|
||||
if($hasIssue)
|
||||
if(helper::hasFeature('issue'))
|
||||
{
|
||||
$params->issueCount['name'] = $this->lang->block->issueCount;
|
||||
$params->issueCount['default'] = 20;
|
||||
$params->issueCount['control'] = 'input';
|
||||
}
|
||||
|
||||
if($hasMeeting)
|
||||
if(helper::hasFeature('meeting'))
|
||||
{
|
||||
$params->meetingCount['name'] = $this->lang->block->meetingCount;
|
||||
$params->meetingCount['default'] = 20;
|
||||
|
||||
Reference in New Issue
Block a user