* Adjust code
This commit is contained in:
@@ -52,9 +52,7 @@ class program extends control
|
||||
else
|
||||
{
|
||||
$topPrograms = $this->program->getList($status, $orderBy, $pager, 'top');
|
||||
$programIds = array();
|
||||
foreach($topPrograms as $programID => $program) $programIds[] = $programID;
|
||||
$programs = $this->program->getList($status, $orderBy, null, 'child', $programIds);
|
||||
$programs = $this->program->getList($status, $orderBy, null, 'child', $topPrograms);
|
||||
|
||||
/* Get summary. */
|
||||
$topCount = $indCount = 0;
|
||||
|
||||
@@ -140,9 +140,9 @@ class programModel extends model
|
||||
$projectIdList = array();
|
||||
if($type === 'child')
|
||||
{
|
||||
foreach($idList as $topID)
|
||||
foreach($idList as $topID => $topProgram)
|
||||
{
|
||||
$projectIdList += $this->dao->select('id')->from(TABLE_PROGRAM)->Where('path')->like(",$topID,%")->fetchPairs('id');
|
||||
$projectIdList += $topProgram->type == 'project' ? array($topID => $topID) : $this->dao->select('id')->from(TABLE_PROGRAM)->Where('path')->like(",$topID,%")->fetchPairs('id');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user