From 2b64fd250e14b3bfd9b322f5a389d016127b963f Mon Sep 17 00:00:00 2001 From: wangyuting Date: Thu, 20 Nov 2025 13:58:34 +0800 Subject: [PATCH] * Optimize code. --- module/testtask/control.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/module/testtask/control.php b/module/testtask/control.php index 4f10915ba9..82cffb80e6 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -291,7 +291,7 @@ class testtask extends control /* Execute extended actions configured in the workflow. */ $this->executeHooks($testtaskID); - if(!empty($executionID)) $this->view->execution = $this->loadModel('project')->getByID($executionID); + if(!empty($testtask->execution)) $this->view->execution = $this->loadModel('project')->getByID($executionID); $this->view->title = "TASK #$testtask->id $testtask->name/" . $products[$testtask->product]; $this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter'); @@ -622,7 +622,7 @@ class testtask extends control /* Set menu. */ $testtask = $this->testtask->getByID($taskID); $this->testtaskZen->setMenu($testtask->product, $testtask->branch, $testtask->project, $testtask->execution, $testtask); - $productID = $this->loadModel('product')->checkAccess($testtask->product, $this->products); + $this->loadModel('product')->checkAccess($testtask->product, $this->products); $this->view->title = $testtask->name . $this->lang->hyphen . $this->lang->testtask->start; $this->view->actions = $this->loadModel('action')->getList('testtask', $taskID); @@ -661,7 +661,7 @@ class testtask extends control /* Set menu. */ $testtask = $this->testtask->getByID($taskID); $this->testtaskZen->setMenu($testtask->product, $testtask->branch, $testtask->project, $testtask->execution, $testtask); - $productID = $this->loadModel('product')->checkAccess($testtask->product, $this->products); + $this->loadModel('product')->checkAccess($testtask->product, $this->products); $this->view->title = $testtask->name . $this->lang->hyphen . $this->lang->close; $this->view->actions = $this->loadModel('action')->getList('testtask', $taskID); @@ -700,7 +700,7 @@ class testtask extends control /* Set menu. */ $testtask = $this->testtask->getByID($taskID); $this->testtaskZen->setMenu($testtask->product, $testtask->branch, $testtask->project, $testtask->execution, $testtask); - $productID = $this->loadModel('product')->checkAccess($testtask->product, $this->products); + $this->loadModel('product')->checkAccess($testtask->product, $this->products); $this->view->title = $testtask->name . $this->lang->hyphen . $this->lang->testtask->block; $this->view->actions = $this->loadModel('action')->getList('testtask', $taskID); @@ -739,7 +739,7 @@ class testtask extends control /* Set menu. */ $testtask = $this->testtask->getByID($taskID); $this->testtaskZen->setMenu($testtask->product, $testtask->branch, $testtask->project, $testtask->execution, $testtask); - $productID = $this->loadModel('product')->checkAccess($testtask->product, $this->products); + $this->loadModel('product')->checkAccess($testtask->product, $this->products); $this->view->title = $testtask->name . $this->lang->hyphen . $this->lang->testtask->activate; $this->view->actions = $this->loadModel('action')->getList('testtask', $taskID);