getTask(); $values = $this->request->getValues(); $values['id'] = $task['id']; $values['project_id'] = $task['project_id']; list($valid, $errors) = $this->taskValidator->validateModification($values); if ($valid && $this->updateTask($task, $values, $errors)) { $this->flash->success(t('Task updated successfully.')); $this->response->redirect($this->helper->url->to('BoardViewController', 'show', array('project_id' => $task['project_id'])), true); } else { $this->flash->failure(t('Unable to update your task.')); $this->edit($values, $errors); } } }