diff --git a/module/execution/control.php b/module/execution/control.php index 388e4ede85..62de145e05 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1646,17 +1646,17 @@ class execution extends control else { $executionProductList = $this->loadModel('product')->getProducts($executionID); - $hasMultiBranchProduct = false; + $multiBranchProduct = false; foreach($executionProductList as $executionProduct) { if($executionProduct->type != 'normal') { - $hasMultiBranchProduct = true; + $multiBranchProduct = true; break; } } - $importPlanStoryTips = $hasMultiBranchProduct ? $this->lang->execution->importBranchPlanStory : $this->lang->execution->importPlanStory; + $importPlanStoryTips = $multiBranchProduct ? $this->lang->execution->importBranchPlanStory : $this->lang->execution->importPlanStory; return print(js::confirm($importPlanStoryTips, inlink('create', "projectID=$projectID&executionID=$executionID©ExecutionID=&planID=$planID&confirm=yes"), inlink('create', "projectID=$projectID&executionID=$executionID"))); } @@ -1918,17 +1918,17 @@ class execution extends control elseif(!empty($newPlans)) { $executionProductList = $this->loadModel('product')->getProducts($executionID); - $hasMultiBranchProduct = false; + $multiBranchProduct = false; foreach($executionProductList as $executionProduct) { if($executionProduct->type != 'normal') { - $hasMultiBranchProduct = true; + $multiBranchProduct = true; break; } } - $importEditPlanStoryTips = $hasMultiBranchProduct ? $this->lang->execution->importBranchEditPlanStory : $this->lang->execution->importEditPlanStory; + $importEditPlanStoryTips = $multiBranchProduct ? $this->lang->execution->importBranchEditPlanStory : $this->lang->execution->importEditPlanStory; return print(js::confirm($importEditPlanStoryTips, inlink('edit', "executionID=$executionID&action=edit&extra=&newPlans=$newPlans&confirm=yes"), inlink('view', "executionID=$executionID"))); } @@ -4151,8 +4151,8 @@ class execution extends control foreach($planStory as $id => $story) { - $projectProducts = zget($projectProducts, $story->product, array()); - if($story->status == 'draft' or $story->status == 'reviewing' or (!empty($projectProducts) and !isset($projectProducts[$story->branch]))) + $projectBranches = zget($projectProducts, $story->product, array()); + if($story->status == 'draft' or $story->status == 'reviewing' or (!empty($projectBranches) and !isset($projectBranches[$story->branch]))) { $count++; unset($planStory[$id]); diff --git a/module/execution/model.php b/module/execution/model.php index 171b9b1700..8aecc43b56 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -2896,7 +2896,7 @@ class executionModel extends model { if(empty($planIdList)) continue; $planIdList = explode(',', $planIdList); - $executionProducts = zget($executionProducts, $productID, array()); + $executionBranches = zget($executionProducts, $productID, array()); foreach($planIdList as $planID) { $planStory = $this->story->getPlanStories($planID); @@ -2904,7 +2904,7 @@ class executionModel extends model { foreach($planStory as $id => $story) { - if($story->status == 'draft' or $story->status == 'reviewing' or (!empty($executionProducts) and !isset($executionProducts[$story->branch]))) + if($story->status == 'draft' or $story->status == 'reviewing' or (!empty($executionBranches) and !isset($executionBranches[$story->branch]))) { unset($planStory[$id]); continue; diff --git a/module/productplan/model.php b/module/productplan/model.php index bf7c2870a9..477441d052 100644 --- a/module/productplan/model.php +++ b/module/productplan/model.php @@ -1085,8 +1085,8 @@ class productplanModel extends model foreach($planStory as $id => $story) { - $projectProducts = zget($projectProducts, $story->product, array()); - if($story->status == 'draft' or $story->status == 'reviewing' or (!empty($projectProducts) and !isset($projectProducts[$story->branch]))) + $projectBranches = zget($projectProducts, $story->product, array()); + if($story->status == 'draft' or $story->status == 'reviewing' or (!empty($projectBranches) and !isset($projectBranches[$story->branch]))) { unset($planStory[$id]); continue; diff --git a/module/story/view/edit.html.php b/module/story/view/edit.html.php index 2d511c25cf..3c32c76524 100644 --- a/module/story/view/edit.html.php +++ b/module/story/view/edit.html.php @@ -192,8 +192,8 @@