From a2120e513c584113de10c9db6a2998a84d95109d Mon Sep 17 00:00:00 2001 From: liugang Date: Tue, 8 Aug 2023 16:21:03 +0800 Subject: [PATCH] * testcase: simplify variables assigned to createScene page. --- module/testcase/control.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/module/testcase/control.php b/module/testcase/control.php index 50c33296b7..48f5e9faa3 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -2613,14 +2613,14 @@ class testcase extends control $branches = (isset($product->type) && $product->type != 'normal') ? $this->loadModel('branch')->getPairs($productID, 'active') : array(); } - $this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->testcase->newScene; - $this->view->moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'case', $startModuleID = 0, ($branch === 'all' || !isset($branches[$branch])) ? 0 : $branch); - $this->view->sceneOptionMenu = $this->testcase->getSceneMenu($productID, $moduleID, $viewType = 'case', $startSceneID = 0, ($branch === 'all' || !isset($branches[$branch])) ? 0 : $branch); - $this->view->currentModuleID = $moduleID ? (int)$moduleID : (int)$this->cookie->lastCaseModule; - $this->view->currentParentID = (int)$this->cookie->lastCaseScene; - $this->view->product = $product; - $this->view->branch = $branch; - $this->view->branches = $branches; + $this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->testcase->newScene; + $this->view->modules = $this->tree->getOptionMenu($productID, $viewType = 'case', $startModuleID = 0, ($branch === 'all' || !isset($branches[$branch])) ? 0 : $branch); + $this->view->scenes = $this->testcase->getSceneMenu($productID, $moduleID, $viewType = 'case', $startSceneID = 0, ($branch === 'all' || !isset($branches[$branch])) ? 0 : $branch); + $this->view->moduleID = $moduleID ? (int)$moduleID : (int)$this->cookie->lastCaseModule; + $this->view->parent = (int)$this->cookie->lastCaseScene; + $this->view->product = $product; + $this->view->branch = $branch; + $this->view->branches = $branches; $this->display(); }