From 41e796c52aa693d13636b54efe15705eaec27f3f Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sat, 20 Sep 2014 14:49:31 +0200 Subject: Models refactoring/improvements --- app/Event/CommentNotificationListener.php | 2 +- app/Event/FileNotificationListener.php | 2 +- app/Event/SubTaskNotificationListener.php | 2 +- app/Event/TaskNotificationListener.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'app/Event') diff --git a/app/Event/CommentNotificationListener.php b/app/Event/CommentNotificationListener.php index 0aa061f3..36b7ea4b 100644 --- a/app/Event/CommentNotificationListener.php +++ b/app/Event/CommentNotificationListener.php @@ -23,7 +23,7 @@ class CommentNotificationListener extends BaseNotificationListener { $values = array(); $values['comment'] = $this->notification->comment->getById($data['id']); - $values['task'] = $this->notification->task->getById($values['comment']['task_id'], true); + $values['task'] = $this->notification->task->getDetails($values['comment']['task_id']); return $values; } diff --git a/app/Event/FileNotificationListener.php b/app/Event/FileNotificationListener.php index 98fc4260..ed5d78ed 100644 --- a/app/Event/FileNotificationListener.php +++ b/app/Event/FileNotificationListener.php @@ -23,7 +23,7 @@ class FileNotificationListener extends BaseNotificationListener { $values = array(); $values['file'] = $data; - $values['task'] = $this->notification->task->getById($data['task_id'], true); + $values['task'] = $this->notification->task->getDetails($data['task_id']); return $values; } diff --git a/app/Event/SubTaskNotificationListener.php b/app/Event/SubTaskNotificationListener.php index 0a239421..299ae00b 100644 --- a/app/Event/SubTaskNotificationListener.php +++ b/app/Event/SubTaskNotificationListener.php @@ -23,7 +23,7 @@ class SubTaskNotificationListener extends BaseNotificationListener { $values = array(); $values['subtask'] = $this->notification->subtask->getById($data['id'], true); - $values['task'] = $this->notification->task->getById($data['task_id'], true); + $values['task'] = $this->notification->task->getDetails($data['task_id']); return $values; } diff --git a/app/Event/TaskNotificationListener.php b/app/Event/TaskNotificationListener.php index ffbe7a8c..466a8eb4 100644 --- a/app/Event/TaskNotificationListener.php +++ b/app/Event/TaskNotificationListener.php @@ -22,7 +22,7 @@ class TaskNotificationListener extends BaseNotificationListener public function getTemplateData(array $data) { $values = array(); - $values['task'] = $this->notification->task->getById($data['task_id'], true); + $values['task'] = $this->notification->task->getDetails($data['task_id']); return $values; } -- cgit v1.2.3