aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/views/rss/object
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-11-04 07:01:21 -0400
committerCash Costello <cash.costello@gmail.com>2011-11-04 07:01:21 -0400
commit7787debf3e536497952256df147ea84e520390e3 (patch)
tree83418d09f54ecd3101f796e1efc721a3021934c9 /mod/groups/views/rss/object
parent5d480f2d8a767c682878071c3c8f7f6b45770c14 (diff)
downloadelgg-7787debf3e536497952256df147ea84e520390e3.tar.gz
elgg-7787debf3e536497952256df147ea84e520390e3.tar.bz2
Fixes #4027 updated groups RSS feeds for 1.8
Diffstat (limited to 'mod/groups/views/rss/object')
-rw-r--r--mod/groups/views/rss/object/groupforumtopic.php49
1 files changed, 26 insertions, 23 deletions
diff --git a/mod/groups/views/rss/object/groupforumtopic.php b/mod/groups/views/rss/object/groupforumtopic.php
index 19297b350..d730ef796 100644
--- a/mod/groups/views/rss/object/groupforumtopic.php
+++ b/mod/groups/views/rss/object/groupforumtopic.php
@@ -1,32 +1,35 @@
<?php
/**
- * Elgg groupforumtopic view
+ * Elgg groupforumtopic RSS view
*
- * @package Elgg
- * @subpackage Core
+ * @package ElggGroups
*/
$title = $vars['entity']->title;
-
-$body = '';
-$annotation = $vars['entity']->getAnnotations('group_topic_post', 1, 0, "asc");
-if (count($annotation == 1)) {
- $body = $annotation[0]->value;
+if (empty($title)) {
+ $title = strip_tags($vars['entity']->description);
+ $title = elgg_get_excerpt($title, 32);
}
-?>
+$permalink = htmlspecialchars($vars['entity']->getURL(), ENT_NOQUOTES, 'UTF-8');
+$pubdate = date('r', $vars['entity']->getTimeCreated());
+
+$description = autop($vars['entity']->description);
+
+$creator = elgg_view('page/components/creator', $vars);
+$georss = elgg_view('page/components/georss', $vars);
+$extension = elgg_view('extensions/item', $vars);
+
+$item = <<<__HTML
<item>
-<guid isPermaLink='true'><?php echo htmlspecialchars($vars['entity']->getURL()); ?></guid>
-<pubDate><?php echo date("r",$vars['entity']->time_created) ?></pubDate>
-<link><?php echo htmlspecialchars($vars['entity']->getURL()); ?></link>
-<title><![CDATA[<?php echo $title; ?>]]></title>
-<description><![CDATA[<?php echo (autop($body)); ?>]]></description>
-<?php
- $owner = $vars['entity']->getOwnerEntity();
- if ($owner) {
-?>
-<dc:creator><?php echo $owner->name; ?></dc:creator>
-<?php
- }
-?>
-</item> \ No newline at end of file
+ <guid isPermaLink="true">$permalink</guid>
+ <pubDate>$pubdate</pubDate>
+ <link>$permalink</link>
+ <title><![CDATA[$title]]></title>
+ <description><![CDATA[$description]]></description>
+ $creator$georss$extension
+</item>
+
+__HTML;
+
+echo $item;