diff --git a/module/score/config.php b/module/score/config.php new file mode 100644 index 0000000000..07ccd10925 --- /dev/null +++ b/module/score/config.php @@ -0,0 +1,7 @@ +loadModel('common')->saveQueryCondition($this->dao->get(), 'task', ($productID or $type == 'needconfirm') ? false : true); $taskList = array_keys($tasks); - $children = $this->dao->select('*')->from(TABLE_TASK)->where('parent')->in($taskList)->orderBy('id_desc')->fetchGroup('parent'); - if(!empty($children)) foreach($children as $key => $child) $tasks[$key]->children = $child; - $teams = $this->dao->select('*')->from(TABLE_TEAM)->where('task')->in($taskList)->fetchGroup('task'); - if($teams) foreach($teams as $key => $team) if(!empty($team)) $tasks[$key]->team = $team; + if(!empty($taskList)) + { + $children = $this->dao->select('*')->from(TABLE_TASK)->where('parent')->in($taskList)->orderBy('id_desc')->fetchGroup('parent'); + if(!empty($children)) foreach($children as $key => $child) $tasks[$key]->children = $child; + $teams = $this->dao->select('*')->from(TABLE_TEAM)->where('task')->in($taskList)->fetchGroup('task'); + if($teams) foreach($teams as $key => $team) if(!empty($team)) $tasks[$key]->team = $team; + } if($tasks) return $this->processTasks($tasks); return array();