diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-11-15 21:49:06 -0500 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-11-15 21:49:06 -0500 |
commit | aa6fffb05a7d84a36991341610675499b6ea8a79 (patch) | |
tree | e0eb08e76e61dfc5cc56ae0bfb7daf7dda49fc99 /app/Model/SubTask.php | |
parent | af93754ec99d8748677dc2cfd92137a8698a90fa (diff) |
Add pagination and sorting to the dashboard
Diffstat (limited to 'app/Model/SubTask.php')
-rw-r--r-- | app/Model/SubTask.php | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/app/Model/SubTask.php b/app/Model/SubTask.php index f414da7f..886ad1f3 100644 --- a/app/Model/SubTask.php +++ b/app/Model/SubTask.php @@ -93,38 +93,6 @@ class SubTask extends Base } /** - * Get all subtasks assigned to a user - * - * @access public - * @param integer $user_id User id - * @param array $status List of status - * @return array - */ - public function getAllByUser($user_id, array $status) - { - $status_list = $this->getStatusList(); - $subtasks = $this->db->table(self::TABLE) - ->columns( - self::TABLE.'.*', - Task::TABLE.'.project_id', - Task::TABLE.'.color_id', - Project::TABLE.'.name AS project_name' - ) - ->eq('user_id', $user_id) - ->in(self::TABLE.'.status', $status) - ->join(Task::TABLE, 'id', 'task_id') - ->join(Project::TABLE, 'id', 'project_id', Task::TABLE) - ->asc(Task::TABLE.'.id') - ->findAll(); - - foreach ($subtasks as &$subtask) { - $subtask['status_name'] = $status_list[$subtask['status']]; - } - - return $subtasks; - } - - /** * Get a subtask by the id * * @access public |