From 15038cdb10f8c691edc7980fd1aed32dcbed3f9f Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sat, 22 Nov 2014 10:05:44 -0500 Subject: Move task creation to a seperate class --- app/Controller/Base.php | 1 + app/Controller/Task.php | 2 +- app/Controller/Webhook.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'app/Controller') diff --git a/app/Controller/Base.php b/app/Controller/Base.php index 5e208009..8285f458 100644 --- a/app/Controller/Base.php +++ b/app/Controller/Base.php @@ -33,6 +33,7 @@ use Model\LastLogin; * @property \Model\ProjectAnalytic $projectAnalytic * @property \Model\SubTask $subTask * @property \Model\Task $task + * @property \Model\TaskCreation $taskCreation * @property \Model\TaskHistory $taskHistory * @property \Model\TaskExport $taskExport * @property \Model\TaskFinder $taskFinder diff --git a/app/Controller/Task.php b/app/Controller/Task.php index cad2f583..e75058d9 100644 --- a/app/Controller/Task.php +++ b/app/Controller/Task.php @@ -127,7 +127,7 @@ class Task extends Base if ($valid) { - if ($this->task->create($values)) { + if ($this->taskCreation->create($values)) { $this->session->flash(t('Task created successfully.')); if (isset($values['another_task']) && $values['another_task'] == 1) { diff --git a/app/Controller/Webhook.php b/app/Controller/Webhook.php index a0bf369a..dcd66a1a 100644 --- a/app/Controller/Webhook.php +++ b/app/Controller/Webhook.php @@ -35,7 +35,7 @@ class Webhook extends Base list($valid,) = $this->taskValidator->validateCreation($values); - if ($valid && $this->task->create($values)) { + if ($valid && $this->taskCreation->create($values)) { $this->response->text('OK'); } -- cgit v1.2.3