From fb7f493036da4a50eee60162aab089d6d74f8aac Mon Sep 17 00:00:00 2001 From: tianshujie Date: Wed, 10 Nov 2021 09:58:49 +0800 Subject: [PATCH] * Modify the error code. --- module/execution/control.php | 6 +++--- module/execution/js/create.js | 2 +- module/execution/js/edit.js | 2 +- module/execution/view/create.html.php | 2 +- module/execution/view/edit.html.php | 2 +- module/project/js/create.js | 2 +- module/project/js/edit.js | 2 +- module/project/view/edit.html.php | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index bb6f6c028f..beff87bc96 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1387,12 +1387,12 @@ class execution extends control $this->view->productID = $productID; $this->view->projectID = $projectID; $this->view->products = $products; - $this->view->multiBranchProducts = $this->loadModel('product')->getMultiBranchPairs(); + $this->view->multiBranchProducts = $this->product->getMultiBranchPairs(); $this->view->productPlan = array(0 => '') + $productPlan; $this->view->productPlans = array(0 => '') + $productPlans; $this->view->whitelist = $whitelist; $this->view->copyExecutionID = $copyExecutionID; - $this->view->branchGroups = isset($branchGroups) ? $branchGroups : $this->loadModel('branch')->getByProducts(array_keys($products), 'noclosed'); + $this->view->branchGroups = isset($branchGroups) ? $branchGroups : $this->execution->getBranchByProduct(array_keys($products), $projectID); $this->view->poUsers = $poUsers; $this->view->pmUsers = $pmUsers; $this->view->qdUsers = $qdUsers; @@ -1545,7 +1545,7 @@ class execution extends control $this->view->unmodifiableBranches = $unmodifiableBranches; $this->view->multiBranchProducts = $this->loadModel('product')->getMultiBranchPairs(); $this->view->productPlans = $productPlans; - $this->view->branchGroups = $this->execution->getByProducts(array_keys($linkedProducts), $execution->project); + $this->view->branchGroups = $this->execution->getBranchByProduct(array_keys($linkedProducts), $execution->project); $this->display(); } diff --git a/module/execution/js/create.js b/module/execution/js/create.js index 44246f978e..3ee176db92 100644 --- a/module/execution/js/create.js +++ b/module/execution/js/create.js @@ -81,7 +81,7 @@ $(function() $('#submit').click(function() { - var products = []; + var products = new Array(); var existedBranch = false; /* Determine whether the products of the same branch are linked. */ diff --git a/module/execution/js/edit.js b/module/execution/js/edit.js index 8c4303edc8..81039a601b 100644 --- a/module/execution/js/edit.js +++ b/module/execution/js/edit.js @@ -4,7 +4,7 @@ $().ready(function() { $('#products0').removeAttr("disabled"); $('#branch0').removeAttr("disabled"); - var products = []; + var products = new Array(); var existedBranch = false; /* Determine whether the products of the same branch are linked. */ diff --git a/module/execution/view/create.html.php b/module/execution/view/create.html.php index 232c7c1f4a..0790b4f602 100644 --- a/module/execution/view/create.html.php +++ b/module/execution/view/create.html.php @@ -135,7 +135,7 @@ id] as $branchID => $branch):?> - id][$branchID];?> + id][$branchID]) ? $productPlans[$product->id][$branchID] : array();?>
id}][$branchID]", $plans, $branches[$product->id][$branchID]->plan, "class='form-control chosen'");?>
diff --git a/module/execution/view/edit.html.php b/module/execution/view/edit.html.php index fc6263e772..7328dee226 100644 --- a/module/execution/view/edit.html.php +++ b/module/execution/view/edit.html.php @@ -151,7 +151,7 @@ id] as $branchID => $branch):?> - id][$branchID];?> + id][$branchID]) ? $productPlans[$product->id][$branchID] : array();?>
id}][{$branchID}]", $plans, $branches[$product->id][$branchID]->plan, "class='form-control chosen'");?>
diff --git a/module/project/js/create.js b/module/project/js/create.js index a345bde136..a4aedf2d0d 100644 --- a/module/project/js/create.js +++ b/module/project/js/create.js @@ -28,7 +28,7 @@ $(function() $('#submit').click(function() { - var products = []; + var products = new Array(); var existedBranch = false; /* Determine whether the products of the same branch are linked. */ diff --git a/module/project/js/edit.js b/module/project/js/edit.js index b0da7af1da..5b143b401c 100644 --- a/module/project/js/edit.js +++ b/module/project/js/edit.js @@ -96,7 +96,7 @@ $(function() $('#submit').click(function() { - var products = []; + var products = new Array(); var existedBranch = false; /* Determine whether the products of the same branch are linked. */ diff --git a/module/project/view/edit.html.php b/module/project/view/edit.html.php index 4e151254ed..4e1d96f647 100644 --- a/module/project/view/edit.html.php +++ b/module/project/view/edit.html.php @@ -149,7 +149,7 @@ id] as $branchID => $branch):?> - id][$branchID];?> + id][$branchID]) ? $productPlans[$product->id][$branchID] : array();?>
id}][{$branchID}]", $plans, $branches[$product->id][$branchID]->plan, "class='form-control chosen'");?>