diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-09-10 18:12:12 +0200 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-09-10 18:12:12 +0200 |
commit | bb5b5dee2d7ef2244300ff622d11d5a32f6ba55f (patch) | |
tree | c1bce860c2ac54c7102fb269ee40925b6c92fc0f /app/Controller | |
parent | cede5d5434e4e50145daf2413c962a335c13cc99 (diff) |
Add Atom feed for project activity
Diffstat (limited to 'app/Controller')
-rw-r--r-- | app/Controller/Project.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/app/Controller/Project.php b/app/Controller/Project.php index 6356a9c6..ef9eac6b 100644 --- a/app/Controller/Project.php +++ b/app/Controller/Project.php @@ -406,6 +406,27 @@ class Project extends Base } /** + * RSS feed for a project + * + * @access public + */ + public function feed() + { + $token = $this->request->getStringParam('token'); + $project = $this->project->getByToken($token); + + // Token verification + if (! $project) { + $this->forbidden(true); + } + + $this->response->xml($this->template->load('project_feed', array( + 'events' => $this->project->getActivity($project['id']), + 'project' => $project, + ))); + } + + /** * Activity page for a project * * @access public |