From 4301c315e5e63f3e30bf9db8bb8a616e6eb7651b Mon Sep 17 00:00:00 2001 From: nickw Date: Mon, 17 May 2010 20:38:33 +0000 Subject: Defaulting RSS view to use Elgg Entity view. git-svn-id: http://code.elgg.org/elgg/trunk@6075 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/rss/river/item/list.php | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) (limited to 'views/rss') 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 - - $url - $time - <![CDATA[$title]]> - $url - - - -__HTML; - - $i++; - if ($i >= $vars['limit']) { - break; - } + if ($i++ >= $vars['limit']) { + break; } + + $entity = get_entity($item->object_guid); + echo elgg_view_entity($entity); } } -- cgit v1.2.3