aboutsummaryrefslogtreecommitdiff
path: root/views/rss/river
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-20 21:08:58 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-20 21:08:58 +0000
commit1e5a6f5ba512107dc2c7f842d756015d04bc0999 (patch)
tree0cf13f2cd37ee5914eb9816f4a565118f88792fc /views/rss/river
parentae6bea4b0b40a94edb0c5271d279f3bdcca6a0c1 (diff)
downloadelgg-1e5a6f5ba512107dc2c7f842d756015d04bc0999.tar.gz
elgg-1e5a6f5ba512107dc2c7f842d756015d04bc0999.tar.bz2
Fixes #3197 fixed the RSS feed for activity (river)
git-svn-id: http://code.elgg.org/elgg/trunk@8786 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/rss/river')
-rw-r--r--views/rss/river/item.php32
-rw-r--r--views/rss/river/item/list.php17
2 files changed, 32 insertions, 17 deletions
diff --git a/views/rss/river/item.php b/views/rss/river/item.php
new file mode 100644
index 000000000..f84e6ccf0
--- /dev/null
+++ b/views/rss/river/item.php
@@ -0,0 +1,32 @@
+<?php
+/**
+ * RSS river view
+ *
+ * @uses $vars['item']
+ */
+$item = $vars['item'];
+
+$view = $item->getView();
+
+$name = $item->getSubjectEntity()->name;
+$body = elgg_view($item->getView(), array('item' => $item), false, false, 'default');
+$body = "$name $body";
+
+$title = strip_tags($body);
+$timestamp = date('r', $item->getPostedTime());
+
+$object = $item->getObjectEntity();
+if ($object) {
+ $url = htmlspecialchars($object->getURL());
+} else {
+ $url = elgg_get_site_url() . 'activity';
+}
+
+?>
+<item>
+ <guid isPermaLink='true'><?php echo $url; ?></guid>
+ <pubDate><?php echo $timestamp; ?></pubDate>
+ <link><?php echo $url; ?></link>
+ <title><![CDATA[<?php echo $title; ?>]]></title>
+ <description><![CDATA[<?php echo ($body); ?>]]></description>
+</item>
diff --git a/views/rss/river/item/list.php b/views/rss/river/item/list.php
deleted file mode 100644
index 3b2fc6179..000000000
--- a/views/rss/river/item/list.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-/**
- * @package Elgg
- * @subpackage Core
- */
-
-if (isset($vars['items']) && is_array($vars['items']) && !empty($vars['items'])) {
- $i = 1;
- foreach($vars['items'] as $item) {
- if ($i++ >= $vars['limit']) {
- break;
- }
-
- $entity = get_entity($item->object_guid);
- echo elgg_view_entity($entity);
- }
-}