* Fix project modules.

This commit is contained in:
Yagami
2019-01-28 15:55:56 +08:00
parent 4e82acf5e7
commit cf27f925ac
+3 -2
View File
@@ -508,7 +508,8 @@ class treeModel extends model
$fullTrees = array();
foreach($products as $id => $product)
{
$productInfo = $this->product->getById($id);
$linkedStory = $this->dao->select('*')->from(TABLE_PROJECTSTORY)->where('project')->eq($rootID)->andWhere('product')->eq($id)->fetch();
$productInfo = $this->product->getById($id);
/* tree menu. */
$productTree = array();
$branchTrees = array();
@@ -520,7 +521,7 @@ class treeModel extends model
->orderBy('grade desc, type, `order`')
->get();
$stmt = $this->dbh->query($query);
if($branch == 0) $productTree = $this->getDataStructure($stmt, 'task', $projectModules);
if($branch == 0 and $linkedStory) $productTree = $this->getDataStructure($stmt, 'task', $projectModules);
if($branch != 0)
{
$children = $this->getDataStructure($stmt, 'task', $projectModules);