blob: fa2914eff0039029da6344ca0f2281a6dcceac5c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
<?php
/**
* RSS river view
*
* @uses $vars['item']
*/
$item = $vars['item'];
$name = $item->getSubjectEntity()->name;
$name = htmlspecialchars($name, ENT_NOQUOTES, 'UTF-8');
$title = elgg_echo('river:update', array($name));
$timestamp = date('r', $item->getPostedTime());
$body = elgg_view('river/elements/summary', $vars, false, false, 'default');
$object = $item->getObjectEntity();
if ($object) {
$url = htmlspecialchars($object->getURL());
} else {
$url = elgg_normalize_url('activity');
}
$html = <<<__HTML
<item>
<guid>$item->id</guid>
<pubDate>$timestamp</pubDate>
<link>$url</link>
<title><![CDATA[$title]]></title>
<description><![CDATA[$body]]></description>
</item>
__HTML;
echo $html;
|