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();?>