aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--views/rss/river/item/list.php31
1 files changed, 6 insertions, 25 deletions
diff --git a/views/rss/river/item/list.php b/views/rss/river/item/list.php
index 8047c24bf..725ffe2c4 100644
--- a/views/rss/river/item/list.php
+++ b/views/rss/river/item/list.php
@@ -7,32 +7,13 @@
*/
if (isset($vars['items']) && is_array($vars['items']) && !empty($vars['items'])) {
+ $i = 1;
foreach($vars['items'] as $item) {
- if (elgg_view_exists($item->view)) {
- $body = elgg_view($item->view, array('item' => $item));
- $time = date('r', $item->posted);
- if ($entity = get_entity($item->object_guid)) {
- $url = htmlspecialchars($entity->getURL());
- } else {
- $url = $vars['url'];
- }
- $title = strip_tags($body);
-
- echo <<<__HTML
-<item>
- <guid isPermaLink="true">$url</guid>
- <pubDate>$time</pubDate>
- <title><![CDATA[$title]]></title>
- <link>$url</link>
- <description><![CDATA[$body]]></description>
-</item>
-
-__HTML;
-
- $i++;
- if ($i >= $vars['limit']) {
- break;
- }
+ if ($i++ >= $vars['limit']) {
+ break;
}
+
+ $entity = get_entity($item->object_guid);
+ echo elgg_view_entity($entity);
}
}