Add Atom feed for project activity

This commit is contained in:
Frédéric Guillot
2014-09-10 18:12:12 +02:00
parent cede5d5434
commit bb5b5dee2d
9 changed files with 66 additions and 6 deletions

View File

@@ -405,6 +405,27 @@ class Project extends Base
$this->response->redirect('?controller=project&action=show&project_id='.$project_id);
}
/**
* 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
*