* Fix bug #16190.
This commit is contained in:
@@ -226,13 +226,13 @@ class productplanModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getPairsForStory($product = 0, $branch = '', $skipParent = false)
|
||||
public function getPairsForStory($product = 0, $branch = 0, $skipParent = false)
|
||||
{
|
||||
$date = date('Y-m-d');
|
||||
$plans = $this->dao->select('id,title,parent,begin,end')->from(TABLE_PRODUCTPLAN)
|
||||
->where('product')->in($product)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->beginIF($branch !== '')->andWhere("branch")->eq($branch)->fi()
|
||||
->beginIF($branch)->andWhere("branch")->in("0,$branch")->fi()
|
||||
->beginIF($skipParent)->andWhere('parent')->ne(-1)->fi()
|
||||
->orderBy('begin desc')
|
||||
->fetchAll('id');
|
||||
|
||||
@@ -456,21 +456,14 @@ class story extends control
|
||||
$this->view->titles = $titles;
|
||||
}
|
||||
|
||||
$this->loadModel('productplan');
|
||||
if($branch == BRANCH_MAIN)
|
||||
{
|
||||
$plans = $this->productplan->getPairsForStory($productID, '', true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$plans = $this->productplan->getPairsForStory($productID, 0, true);
|
||||
$plans += $this->productplan->getPairsForStory($productID, $branch, true);
|
||||
}
|
||||
|
||||
$moduleOptionMenu['ditto'] = $this->lang->story->ditto;
|
||||
$plans['ditto'] = $this->lang->story->ditto;
|
||||
$priList = (array)$this->lang->story->priList;
|
||||
$priList['ditto'] = $this->lang->story->ditto;
|
||||
|
||||
$plans = $this->loadModel('productplan')->getPairsForStory($productID, $branch === 'all' ? 0 : $branch, true);
|
||||
$plans['ditto'] = $this->lang->story->ditto;
|
||||
|
||||
$priList = (array)$this->lang->story->priList;
|
||||
$priList['ditto'] = $this->lang->story->ditto;
|
||||
|
||||
$sourceList = (array)$this->lang->story->sourceList;
|
||||
$sourceList['ditto'] = $this->lang->story->ditto;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user