* Adjust code

This commit is contained in:
zenggang
2022-05-13 00:44:07 +00:00
parent e41dc21372
commit 94bf6a70a2
2 changed files with 3 additions and 5 deletions

View File

@@ -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');
}
}