summaryrefslogtreecommitdiff
path: root/app/Controller
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-10-12 21:38:56 -0400
committerFrédéric Guillot <fred@kanboard.net>2014-10-12 21:38:56 -0400
commit074056352de98fc567b4d13184c72887c75625d0 (patch)
tree7d262c3a5d5f779648f51aa0eb7d9f279c05d89d /app/Controller
parent4061927d215c846ff8eb196301bf61532018042b (diff)
Project activity refactoring and listeners improvements
Diffstat (limited to 'app/Controller')
-rw-r--r--app/Controller/Base.php4
-rw-r--r--app/Controller/Project.php4
2 files changed, 3 insertions, 5 deletions
diff --git a/app/Controller/Base.php b/app/Controller/Base.php
index ac88df04..a8e22fd8 100644
--- a/app/Controller/Base.php
+++ b/app/Controller/Base.php
@@ -153,13 +153,11 @@ abstract class Base
private function attachEvents()
{
$models = array(
+ 'projectActivity', // Order is important
'action',
'project',
'webhook',
'notification',
- 'taskHistory',
- 'commentHistory',
- 'subtaskHistory',
);
foreach ($models as $model) {
diff --git a/app/Controller/Project.php b/app/Controller/Project.php
index 39d8d1b0..1fac3ffb 100644
--- a/app/Controller/Project.php
+++ b/app/Controller/Project.php
@@ -364,7 +364,7 @@ class Project extends Base
}
$this->response->xml($this->template->load('project_feed', array(
- 'events' => $this->project->getActivity($project['id']),
+ 'events' => $this->projectActivity->getAll($project['id']),
'project' => $project,
)));
}
@@ -379,7 +379,7 @@ class Project extends Base
$project = $this->getProject();
$this->response->html($this->template->layout('project_activity', array(
- 'events' => $this->project->getActivity($project['id']),
+ 'events' => $this->projectActivity->getAll($project['id']),
'menu' => 'projects',
'project' => $project,
'title' => t('%s\'s activity', $project['name'])