diff --git a/module/productplan/control.php b/module/productplan/control.php index 486c675848..bf60aab4f2 100644 --- a/module/productplan/control.php +++ b/module/productplan/control.php @@ -605,7 +605,7 @@ class productplan extends control */ public function ajaxGetProductplans($productID, $branch = 0, $number = '', $expired = '') { - $plans = $this->productplan->getPairs($productID, $branch, $expired, true); + $plans = $this->productplan->getPairs($productID, empty($branch) ? '' : $branch, $expired, true); $planName = $number === '' ? 'plan' : "plan[$number]"; $plans = empty($plans) ? array('' => '') : $plans; echo html::select($planName, $plans, '', "class='form-control'"); diff --git a/module/story/control.php b/module/story/control.php index 2bc3434095..6b869ad089 100755 --- a/module/story/control.php +++ b/module/story/control.php @@ -691,7 +691,7 @@ class story extends control } $this->view->titles = $titles; } - $plans = $this->loadModel('productplan')->getPairsForStory($productID, ($branch === 'all' or !in_array($branch, array_keys($branches))) ? 0 : $branch, 'skipParent|unexpired|noclosed'); + $plans = $this->loadModel('productplan')->getPairsForStory($productID, ($branch === 'all' or empty($branch)) ? '' : $branch, 'skipParent|unexpired|noclosed'); $plans['ditto'] = $this->lang->story->ditto; $priList = (array)$this->lang->story->priList;