summaryrefslogtreecommitdiff
path: root/app/Action/TaskEmail.php
diff options
context:
space:
mode:
authorChristopher Geelen <christopher.geelen@vinotion.nl>2016-07-27 13:58:23 +0200
committerChristopher Geelen <christopher.geelen@vinotion.nl>2016-07-27 13:58:23 +0200
commit24745182724ca69092554eb5946e31584420f68a (patch)
tree386cdf7a8d7bf7ad2d80d938333bafbaf0fedcbc /app/Action/TaskEmail.php
parent160c0b885eb4f1a1a1baa2b6b9fc6d99fdb80d0c (diff)
parent9649f7ba82ba7fe6a470abfe9f65e214cc68fa34 (diff)
Merge remote-tracking branch 'upstream/master'
Conflicts: app/Job/NotificationJob.php
Diffstat (limited to 'app/Action/TaskEmail.php')
-rw-r--r--app/Action/TaskEmail.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/app/Action/TaskEmail.php b/app/Action/TaskEmail.php
index 7f9ba416..fdfe7987 100644
--- a/app/Action/TaskEmail.php
+++ b/app/Action/TaskEmail.php
@@ -7,7 +7,7 @@ use Kanboard\Model\TaskModel;
/**
* Email a task to someone
*
- * @package action
+ * @package Kanboard\Action
* @author Frederic Guillot
*/
class TaskEmail extends Base
@@ -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');
}
}