Merge branch '180'
This commit is contained in:
@@ -243,7 +243,7 @@ class treeModel extends model
|
||||
{
|
||||
/* If createdVersion <= 4.1, go to getOptionMenu(). */
|
||||
$products = $this->loadModel('product')->getProductPairsByProject($rootID);
|
||||
$branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products));
|
||||
$branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), 'noclosed');
|
||||
|
||||
if(!$this->isMergeModule($rootID, 'task') or !$products) return $this->getOptionMenu($rootID, 'task', $startModule);
|
||||
|
||||
@@ -277,10 +277,12 @@ class treeModel extends model
|
||||
{
|
||||
foreach($rootModules as $id => $rootModule)
|
||||
{
|
||||
$activeBranch = isset($branchGroups[$id]) ? array_keys($branchGroups[$id]) : array();
|
||||
if($type == 'product')
|
||||
{
|
||||
$modules = $this->dao->select('*')->from(TABLE_MODULE)->where("((root = '" . (int)$rootID . "' and type = 'task' and parent != 0) OR (root = $id and type = 'story'))")
|
||||
->beginIF($startModulePath)->andWhere('path')->like($startModulePath)->fi()
|
||||
->beginIF(!empty($activeBranch))->andWhere('branch')->in($activeBranch)->fi()
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy('grade desc, branch, `order`, type')
|
||||
->fetchAll('id');
|
||||
|
||||
Reference in New Issue
Block a user