summaryrefslogtreecommitdiff
path: root/app/Controller
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-11-22 10:05:44 -0500
committerFrédéric Guillot <fred@kanboard.net>2014-11-22 10:05:44 -0500
commit15038cdb10f8c691edc7980fd1aed32dcbed3f9f (patch)
treeebdf873e5c65616c3fd36ea2c7a449da52a61877 /app/Controller
parent8f0e544cd91b24423951bbb5d3f3be0950a63abe (diff)
Move task creation to a seperate class
Diffstat (limited to 'app/Controller')
-rw-r--r--app/Controller/Base.php1
-rw-r--r--app/Controller/Task.php2
-rw-r--r--app/Controller/Webhook.php2
3 files changed, 3 insertions, 2 deletions
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');
}