From 27122d1303028bbdc48b79f6b02ee1aca5c1ebf8 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Wed, 10 May 2023 10:50:02 +0800 Subject: [PATCH] * Merge if statement with the enclosing one. --- module/execution/model.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index c5d4aa5ea6..54d18d4801 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -2428,10 +2428,7 @@ class executionModel extends model /* Set modules and $browseType. */ $modules = array(); if($moduleID) $modules = $this->loadModel('tree')->getAllChildID($moduleID); - if($browseType == 'bymodule' or $browseType == 'byproduct') - { - if(($this->session->taskBrowseType) and ($this->session->taskBrowseType != 'bysearch')) $browseType = $this->session->taskBrowseType; - } + if(in_array($browseType, array('bymodule', 'byproduct')) && $this->session->taskBrowseType && $this->session->taskBrowseType != 'bysearch') $browseType = $this->session->taskBrowseType; /* Get tasks. */ $tasks = array();