diff options
| author | Frédéric Guillot <fred@kanboard.net> | 2014-11-24 21:32:03 -0500 |
|---|---|---|
| committer | Frédéric Guillot <fred@kanboard.net> | 2014-11-24 21:32:03 -0500 |
| commit | 37c6616e50dbce2a298a27513b9882bb105405b0 (patch) | |
| tree | 32fc40db197717893aa08dc50fa275a6804fa34a /app/Controller/Subtask.php | |
| parent | 5d7cff35261b485a994f5346f682fd802218de8d (diff) | |
Integrate tooltips and code cleanup/fix bugs, see #166
Diffstat (limited to 'app/Controller/Subtask.php')
| -rw-r--r-- | app/Controller/Subtask.php | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/app/Controller/Subtask.php b/app/Controller/Subtask.php index bc50b5e1..e48e7767 100644 --- a/app/Controller/Subtask.php +++ b/app/Controller/Subtask.php @@ -183,15 +183,9 @@ class Subtask extends Base public function toggleStatus() { $task = $this->getTask(); - $subtask = $this->getSubtask(); - - $value = array( - 'id' => $subtask['id'], - 'status' => ($subtask['status'] + 1) % 3, - 'task_id' => $task['id'], - ); + $subtask_id = $this->request->getIntegerParam('subtask_id'); - if (! $this->subTask->update($value)) { + if (! $this->subTask->toggleStatus($subtask_id)) { $this->session->flashError(t('Unable to update your sub-task.')); } |
