* fix bug #908.
This commit is contained in:
+12
-3
@@ -1151,9 +1151,18 @@ class task extends control
|
||||
}
|
||||
|
||||
/* Get tasks. */
|
||||
$tasks = $this->dao->select('*')->from(TABLE_TASK)->alias('t1')->where($this->session->taskQueryCondition)
|
||||
->beginIF($this->post->exportType == 'selected')->andWhere('t1.id')->in($this->cookie->checkedItem)->fi()
|
||||
->orderBy($orderBy)->fetchAll('id');
|
||||
$tasks = array();
|
||||
if($this->session->taskOnlyCondition)
|
||||
{
|
||||
$tasks = $this->dao->select('*')->from(TABLE_TASK)->alias('t1')->where($this->session->taskQueryCondition)
|
||||
->beginIF($this->post->exportType == 'selected')->andWhere('t1.id')->in($this->cookie->checkedItem)->fi()
|
||||
->orderBy($orderBy)->fetchAll('id');
|
||||
}
|
||||
else
|
||||
{
|
||||
$stmt = $this->dbh->query($this->session->taskQueryCondition . ($this->post->exportType == 'selected' ? " AND t1.id IN({$this->cookie->checkedItem})" : '') . " ORDER BY " . strtr($orderBy, '_', ' '));
|
||||
while($row = $stmt->fetch()) $tasks[$row->id] = $row;
|
||||
}
|
||||
|
||||
/* Get users and projects. */
|
||||
$users = $this->loadModel('user')->getPairs('noletter');
|
||||
|
||||
Reference in New Issue
Block a user