change RSS mime type to application/rss+xml
[diogenes.git] / include / admin / rss.php
... / ...
CommitLineData
1<?php
2require_once 'diogenes.common.inc.php';
3require_once 'diogenes.barrel.inc.php';
4require_once 'Barrel/Events.php';
5$page = new $globals->barrel;
6$events = new Diogenes_Barrel_Events($page->barrel);
7
8// assignments
9$page->assign('version', $globals->version);
10$page->assign('site_title', stripslashes($page->barrel->options->title));
11$page->assign('site_link', $page->urlBarrel($page->barrel->alias, $page->barrel->vhost, ''));
12
13// retrieve recent events
14$event_arr = $events->getEvents($page);
15foreach($event_arr as $event)
16{
17 //$page->assign('events', $event_arr);
18 if ($event['flags'] & EVENT_FLAG_PUBLIC)
19 {
20 $item = $event;
21 $item['date'] = gmstrftime("%a, %d %b %Y %T %Z", strtotime($event['stamp']));
22 $item['title'] .= " : ". $item['opfile'];
23 $page->append('items', $item);
24 }
25}
26header("Content-Type: application/rss+xml");
27$page->display('', 'admin-rss.tpl');
28?>