From ba2a8532175992897d0a3559e6c1f66010eaa3fc Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Tue, 8 Nov 2011 06:28:14 -0500 Subject: Refs #3150 can pass description to RSS page shell --- views/rss/page/default.php | 43 +++++++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 18 deletions(-) (limited to 'views') 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 ""; - // 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, ''); - > +$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 ""; +echo << - <![CDATA[<?php echo $title; ?>]]> - - - + <![CDATA[$title]]> + $url + + $extensions + $body +END; -- cgit v1.2.3