aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-11-08 06:28:14 -0500
committerCash Costello <cash.costello@gmail.com>2011-11-08 06:28:14 -0500
commit42e3a3353eb524fc984f72e2b525d5597444d1aa (patch)
tree4f61222dc0ca3bc8c567888740a80008aa94c4ee
parentc8f62956115245d023c5f049524e450f3fbcd5d6 (diff)
downloadelgg-42e3a3353eb524fc984f72e2b525d5597444d1aa.tar.gz
elgg-42e3a3353eb524fc984f72e2b525d5597444d1aa.tar.bz2
Refs #3150 can pass description to RSS page shell
-rw-r--r--views/rss/page/default.php43
1 files changed, 25 insertions, 18 deletions
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;