* Compute progress only without changing task object.
This commit is contained in:
+5
-1
@@ -329,7 +329,11 @@ class taskTao extends taskModel
|
||||
$childrenStatus = array();
|
||||
|
||||
/* 有的任务对象不是通过taskModel::getByID获取的(比如执行的任务列表),因此可能没有children,需要重新获取它的子任务。*/
|
||||
if(!isset($task->children)) $task->children = $this->dao->select('*')->from(TABLE_TASK)->where('parent')->eq($task->id)->fetchAll('id');
|
||||
if(!isset($task->children))
|
||||
{
|
||||
$task = clone $task;
|
||||
$task->children = $this->dao->select('*')->from(TABLE_TASK)->where('parent')->eq($task->id)->fetchAll('id');
|
||||
}
|
||||
|
||||
foreach($task->children as $childTask)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user