From 68688736b59e47123c8fa3fefb0555fbe9973a7c Mon Sep 17 00:00:00 2001 From: hufangzhou <746775970@qq.com> Date: Thu, 1 Apr 2021 15:56:30 +0800 Subject: [PATCH] * Fix bug #11742. --- module/execution/control.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index 1b939277fc..a2bc444732 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1192,6 +1192,7 @@ class execution extends control */ public function create($projectID = '', $executionID = '', $copyExecutionID = '', $planID = 0, $confirm = 'no', $productID = 0) { + /* Set menu. */ if($this->app->openApp == 'project') { if(!empty($copyExecutionID)) $projectID = $this->dao->select('project')->from(TABLE_EXECUTION)->where('id')->eq($copyExecutionID)->fetch('project'); @@ -1200,6 +1201,11 @@ class execution extends control $this->project->setMenu($projectID); } + elseif($this->app->openApp == 'execution') + { + $executionID = key($this->executions); + $this->execution->setMenu($executionID); + } $this->app->loadLang('program'); $this->app->loadLang('stage'); @@ -1291,9 +1297,6 @@ class execution extends control } } - $executionID = key($this->executions); - $this->execution->setMenu($executionID); - $this->view->title = $this->lang->execution->create; $this->view->position[] = $this->view->title; $this->view->executions = array('' => '') + $this->execution->getList();