aboutsummaryrefslogtreecommitdiff
path: root/views/rss
diff options
context:
space:
mode:
Diffstat (limited to 'views/rss')
-rw-r--r--views/rss/annotation/generic_comment.php2
-rw-r--r--views/rss/group/default.php2
-rw-r--r--views/rss/object/default.php6
-rw-r--r--views/rss/page/components/gallery.php8
-rw-r--r--views/rss/page/default.php43
-rw-r--r--views/rss/user/default.php2
6 files changed, 40 insertions, 23 deletions
diff --git a/views/rss/annotation/generic_comment.php b/views/rss/annotation/generic_comment.php
index 9e9107568..de652fc8e 100644
--- a/views/rss/annotation/generic_comment.php
+++ b/views/rss/annotation/generic_comment.php
@@ -16,7 +16,7 @@ $permalink = $annotation->getURL();
$title = elgg_echo('generic_comment:title', array($poster_name));
$creator = elgg_view('page/components/creator', array('entity' => $annotation));
-$extensions = elgg_view('extensions/item');
+$extensions = elgg_view('extensions/item', $vars);
$item = <<<__HTML
<item>
diff --git a/views/rss/group/default.php b/views/rss/group/default.php
index 1276ab8f1..f57c7f82c 100644
--- a/views/rss/group/default.php
+++ b/views/rss/group/default.php
@@ -20,7 +20,7 @@ if ($vars['entity']->description) {
$creator = elgg_view('page/components/creator', $vars);
$georss = elgg_view('page/components/georss', $vars);
-$extension = elgg_view('extensions/item');
+$extension = elgg_view('extensions/item', $vars);
$item = <<<__HTML
<item>
diff --git a/views/rss/object/default.php b/views/rss/object/default.php
index b5d269ac7..be8025953 100644
--- a/views/rss/object/default.php
+++ b/views/rss/object/default.php
@@ -15,9 +15,11 @@ if (empty($title)) {
$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');
+$extension = elgg_view('extensions/item', $vars);
$item = <<<__HTML
<item>
@@ -25,7 +27,7 @@ $item = <<<__HTML
<pubDate>$pubdate</pubDate>
<link>$permalink</link>
<title><![CDATA[$title]]></title>
- <description><![CDATA[{$vars['entity']->description}]]></description>
+ <description><![CDATA[$description]]></description>
$creator$georss$extension
</item>
diff --git a/views/rss/page/components/gallery.php b/views/rss/page/components/gallery.php
new file mode 100644
index 000000000..690416e5b
--- /dev/null
+++ b/views/rss/page/components/gallery.php
@@ -0,0 +1,8 @@
+<?php
+/*
+ * RSS gallery view
+ *
+ * @uses $vars['items']
+ */
+
+echo elgg_view('page/components/list', $vars);
diff --git a/views/rss/page/default.php b/views/rss/page/default.php
index 246ec972e..c973e3fd0 100644
--- a/views/rss/page/default.php
+++ b/views/rss/page/default.php
@@ -2,17 +2,13 @@
/**
* Elgg RSS output pageshell
*
- * @package Elgg
- * @subpackage Core
+ * @package Elgg.Core
+ *
+ * @uses $vars['title'] The title of the RSS feed
+ * @uses $vars['body'] The items for the RSS feed as a string
+ * @uses $vars['descrption'] The description for the RSS feed
*/
-header("Content-Type: text/xml");
-
-// allow caching as required by stupid MS products for https feeds.
-header('Pragma: public', TRUE);
-
-echo "<?xml version='1.0'?>";
-
// Set title
if (empty($vars['title'])) {
$title = elgg_get_config('sitename');
@@ -23,17 +19,28 @@ if (empty($vars['title'])) {
// Remove RSS from URL
$url = str_replace('?view=rss', '', full_url());
$url = str_replace('&view=rss', '', $url);
+$url = htmlspecialchars($url, ENT_NOQUOTES, 'UTF-8');
-?>
+$body = elgg_extract('body', $vars, '');
+$description = elgg_extract('description', $vars, '');
-<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:georss="http://www.georss.org/georss" <?php echo elgg_view('extensions/xmlns'); ?> >
+$namespaces = elgg_view('extensions/xmlns');
+$extensions = elgg_view('extensions/channel');
+
+
+// allow caching as required by stupid MS products for https feeds.
+header('Pragma: public', true);
+header("Content-Type: text/xml");
+
+echo "<?xml version='1.0'?>";
+echo <<<END
+<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:georss="http://www.georss.org/georss" $namespaces>
<channel>
- <title><![CDATA[<?php echo $title; ?>]]></title>
- <link><?php echo htmlentities($url); ?></link>
- <description></description>
-<?php
- echo elgg_view('extensions/channel');
- echo $vars['body'];
-?>
+ <title><![CDATA[$title]]></title>
+ <link>$url</link>
+ <description><![CDATA[$description]]></description>
+ $extensions
+ $body
</channel>
</rss>
+END;
diff --git a/views/rss/user/default.php b/views/rss/user/default.php
index 1500881f8..1c7bf75e7 100644
--- a/views/rss/user/default.php
+++ b/views/rss/user/default.php
@@ -17,7 +17,7 @@ if ($vars['entity']->description) {
}
$georss = elgg_view('page/components/georss', $vars);
-$extension = elgg_view('extensions/item');
+$extension = elgg_view('extensions/item', $vars);
$item = <<<__HTML
<item>