aboutsummaryrefslogtreecommitdiff
path: root/views/rss/group/default.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/rss/group/default.php')
-rw-r--r--views/rss/group/default.php54
1 files changed, 27 insertions, 27 deletions
diff --git a/views/rss/group/default.php b/views/rss/group/default.php
index 4ffceba78..1276ab8f1 100644
--- a/views/rss/group/default.php
+++ b/views/rss/group/default.php
@@ -1,37 +1,37 @@
<?php
/**
- * Elgg default group view
+ * RSS group view
*
* @package Elgg
* @subpackage Core
*/
-?>
+$permalink = htmlspecialchars($vars['entity']->getURL(), ENT_NOQUOTES, 'UTF-8');
+$pubdate = date('r', $vars['entity']->getTimeCreated());
+$title = htmlspecialchars($vars['entity']->name, ENT_NOQUOTES, 'UTF-8');
+if ($vars['entity']->description) {
+ $description = autop($vars['entity']->description);
+} elseif ($vars['entity']->briefdescription) {
+ $description = autop($vars['entity']->briefdescription);
+} else {
+ $description = '';
+}
+
+$creator = elgg_view('page/components/creator', $vars);
+$georss = elgg_view('page/components/georss', $vars);
+$extension = elgg_view('extensions/item');
+
+$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 (($vars['entity']->name)); ?>]]></title>
-<description><![CDATA[<?php echo (autop($vars['entity']->description)); ?>]]></description>
-<?php
- $owner = $vars['entity']->getOwnerEntity();
- if ($owner) {
-?>
-<dc:creator><?php echo $owner->name; ?></dc:creator>
-<?php
- }
-?>
-<?php
- if (
- ($vars['entity'] instanceof Locatable) &&
- ($vars['entity']->getLongitude()) &&
- ($vars['entity']->getLatitude())
- ) {
- ?>
- <georss:point><?php echo $vars['entity']->getLatitude(); ?> <?php echo $vars['entity']->getLongitude(); ?></georss:point>
- <?php
- }
-?>
-<?php echo elgg_view('extensions/item'); ?>
+ <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;