diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-07-19 22:38:30 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-07-19 22:38:30 -0400 |
commit | 390082aa41cb81610089163b1cc3a256f3b3c513 (patch) | |
tree | 1ada3964702ee536fe1486f34230f8e30a95d82e /app/Action/TaskEmail.php | |
parent | d9d37882228771bca0c7f53f5ffcef90ba7ac1c5 (diff) |
Refactoring of internal task events
Diffstat (limited to 'app/Action/TaskEmail.php')
-rw-r--r-- | app/Action/TaskEmail.php | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/app/Action/TaskEmail.php b/app/Action/TaskEmail.php index 7f9ba416..526e9aa8 100644 --- a/app/Action/TaskEmail.php +++ b/app/Action/TaskEmail.php @@ -62,7 +62,10 @@ class TaskEmail extends Base { return array( 'task_id', - 'column_id', + 'task' => array( + 'project_id', + 'column_id', + ), ); } @@ -78,13 +81,14 @@ class TaskEmail extends Base $user = $this->userModel->getById($this->getParam('user_id')); if (! empty($user['email'])) { - $task = $this->taskFinderModel->getDetails($data['task_id']); - $this->emailClient->send( $user['email'], $user['name'] ?: $user['username'], $this->getParam('subject'), - $this->template->render('notification/task_create', array('task' => $task, 'application_url' => $this->configModel->get('application_url'))) + $this->template->render('notification/task_create', array( + 'task' => $data['task'], + 'application_url' => $this->configModel->get('application_url'), + )) ); return true; @@ -102,6 +106,6 @@ class TaskEmail extends Base */ public function hasRequiredCondition(array $data) { - return $data['column_id'] == $this->getParam('column_id'); + return $data['task']['column_id'] == $this->getParam('column_id'); } } |