diff --git a/module/my/control.php b/module/my/control.php index fb62dfb1ac..000b87e273 100644 --- a/module/my/control.php +++ b/module/my/control.php @@ -286,12 +286,14 @@ class my extends control /* Get tasks. */ $tasks = $this->loadModel('task')->getUserTasks($this->app->user->account, $type, 0, $pager, $sort); + $parents = array(); foreach($tasks as $task) { if($task->parent > 0) $parents[$task->parent] = $task->parent; } $parents = $this->dao->select('*')->from(TABLE_TASK)->where('id')->in($parents)->fetchAll('id'); + foreach($tasks as $task) { if($task->parent > 0) diff --git a/module/repo/model.php b/module/repo/model.php index 73ecf8a4c5..4ec3a17d47 100644 --- a/module/repo/model.php +++ b/module/repo/model.php @@ -159,13 +159,7 @@ class repoModel extends model } else { - if($projectID) - { - foreach($productIdList as $productID) - { - if(strpos(",$repo->product,", ",$productID,") === false) unset($repos[$i]); - } - } + if($projectID && !in_array($repo->product, $productIdList)) unset($repos[$i]); } }