diff options
author | nickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-17 20:38:33 +0000 |
---|---|---|
committer | nickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-17 20:38:33 +0000 |
commit | 4301c315e5e63f3e30bf9db8bb8a616e6eb7651b (patch) | |
tree | c1b97e9f91621a0fd11002c8b9cc1c9bba0fc4f3 /views/rss | |
parent | fcc8efa279aab75419022bd8fc1b3134023c7806 (diff) | |
download | elgg-4301c315e5e63f3e30bf9db8bb8a616e6eb7651b.tar.gz elgg-4301c315e5e63f3e30bf9db8bb8a616e6eb7651b.tar.bz2 |
Defaulting RSS view to use Elgg Entity view.
git-svn-id: http://code.elgg.org/elgg/trunk@6075 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/rss')
-rw-r--r-- | views/rss/river/item/list.php | 31 |
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); } } |