* + child task export

This commit is contained in:
滔哥
2017-10-25 09:34:48 +08:00
parent 5e3cc44e86
commit 12cfe294fc
+9
View File
@@ -1170,6 +1170,9 @@ class task extends control
->beginIF($this->post->exportType == 'selected')->andWhere('t1.id')->in($this->cookie->checkedItem)->fi()
->orderBy($orderBy)->fetchAll('id');
$taskList = array_keys($tasks);
if(!empty($taskList)) $children = $this->dao->select('*')->from(TABLE_TASK)->where('parent')->in($taskList)->fetchGroup('parent');
foreach($tasks as $key => $task)
{
/* Compute task progess. */
@@ -1189,6 +1192,12 @@ class task extends control
$task->progess .= '%';
$tasks[$key] = $task;
if(isset($children[$task->id])) foreach($children[$task->id] as $child)
{
$child->name = $taskLang->childrenAB . ') ' . $child->name;
$tasks[$child->id] = $child;
}
}
}
else