* Finish task #45157.
This commit is contained in:
+17
-1
@@ -147,8 +147,24 @@ class my extends control
|
||||
/* Append id for secend sort. */
|
||||
$sort = $this->loadModel('common')->appendOrder($orderBy);
|
||||
|
||||
$todos = $this->loadModel('todo')->getList($type, $account, $status, 0, $pager, $sort);
|
||||
$tasks = $this->loadModel('task')->getUserSuspendedTasks($account);
|
||||
foreach($todos as $key => $todo)
|
||||
{
|
||||
foreach($tasks as $task)
|
||||
{
|
||||
if($todo->type == 'task' and $todo->idvalue = $task->id)
|
||||
{
|
||||
unset($todos[$key]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$pager->recTotal = count($todos);
|
||||
|
||||
/* Assign. */
|
||||
$this->view->todos = $this->loadModel('todo')->getList($type, $account, $status, 0, $pager, $sort);
|
||||
$this->view->todos = $todos;
|
||||
$this->view->date = (int)$type == 0 ? date(DT_DATE1) : date(DT_DATE1, strtotime($type));
|
||||
$this->view->type = $type;
|
||||
$this->view->recTotal = $recTotal;
|
||||
|
||||
+12
-1
@@ -1348,7 +1348,18 @@ class task extends control
|
||||
$user = $this->loadModel('user')->getById($userID, 'id');
|
||||
$account = $user->account;
|
||||
|
||||
$tasks = $this->task->getUserTaskPairs($account, $status);
|
||||
$tasks = $this->task->getUserTaskPairs($account, $status);
|
||||
$suspendedTasks = $this->task->getUserSuspendedTasks($account);
|
||||
foreach($tasks as $taskid => $task)
|
||||
{
|
||||
foreach($suspendedTasks as $suspendedTask)
|
||||
{
|
||||
if($taskid == $suspendedTask->id)
|
||||
{
|
||||
unset($tasks[$taskid]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($id) die(html::select("tasks[$id]", $tasks, '', 'class="form-control"'));
|
||||
die(html::select('task', $tasks, '', 'class=form-control'));
|
||||
|
||||
Reference in New Issue
Block a user