From a4a13987fea060c2116f007afb09989c2b38da5b Mon Sep 17 00:00:00 2001 From: tianshujie Date: Sat, 8 Jul 2023 13:34:49 +0800 Subject: [PATCH] * Change the code smell. --- module/productplan/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/productplan/model.php b/module/productplan/model.php index c110048e3c..c1c4934d47 100644 --- a/module/productplan/model.php +++ b/module/productplan/model.php @@ -1415,7 +1415,7 @@ class productplanModel extends model $actions[] = $this->buildActionBtn('none', 'plus', $params, $plan, $type, '', '', '', false, 'disabled', $this->lang->productplan->createExecution); } - if($type == 'browse' and ($canStart or $canFinish or $canClose or $canCreateExec) and ($canLinkStory or $canLinkBug or $canEdit or $canCreateChild or $canDelete)) + if($type == 'browse' and in_array(true, array($canStart, $canFinish, $canClose, $canCreateExec)) and in_array(true, array($canLinkStory, $canLinkBug, $canEdit, $canCreateChild, $canDelete))) { $actions[] = $this->buildActionBtn('none', 'divider', $params, $plan, $type); } @@ -1445,7 +1445,7 @@ class productplanModel extends model if($type == 'browse') { - if(($canLinkStory or $canLinkBug or $canEdit or $canCreateChild) and $canDelete) + if(in_array(true, array($canLinkStory, $canLinkBug, $canEdit, $canCreateChild)) and $canDelete) { $actions[] = $this->buildActionBtn('none', 'divider', $params, $plan, $type); }