From 5b17c6534ffe3feaed880c6d2fef1f0b74ae325b Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Thu, 21 Dec 2023 09:59:44 +0800 Subject: [PATCH] * Adjust mr link task result. --- module/mr/control.php | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/module/mr/control.php b/module/mr/control.php index e0b3ac5da1..df4db42d2d 100644 --- a/module/mr/control.php +++ b/module/mr/control.php @@ -967,17 +967,10 @@ class mr extends control /* Get tasks by executions. */ $allTasks = array(); - if($browseType == 'bysearch') + foreach($productExecutionIDs as $productExecutionID) { - $allTasks = $this->loadModel('execution')->getTasks(0, 0, array(), $browseType, $queryID, 0, $orderBy, null); - } - else - { - foreach($productExecutionIDs as $productExecutionID) - { - $tasks = $this->execution->getTasks(0, $productExecutionID, array(), $browseType, $queryID, 0, $orderBy, null); - $allTasks = array_merge($tasks, $allTasks); - } + $tasks = $this->execution->getTasks(0, $productExecutionID, array(), $browseType, $queryID, 0, $orderBy, null); + $allTasks += $tasks; } /* Filter linked tasks. */ $linkedTaskIDs = array_keys($linkedTasks);