Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1217)
+++ branches/2.8.x/CHANGELOG	(revision 1218)
@@ -11,6 +11,8 @@
 ! = Update/Change
 
 ------------------------------------- 2.8.1 -------------------------------------
+16-Dec-2009 Ruud Eisinga
+#	Ticket #894: Bugfixes in newsmodule > rss.php
 16-DEC-2009 Manuel Lang (MaGnaL)
 #	Minor bugfixes: Use localized messages in preference forms on frontend and backend,
 	correct html/php syntax in upgrade-script.php and NL localization of show_menu2 snippet  
Index: branches/2.8.x/wb/modules/news/info.php
===================================================================
--- branches/2.8.x/wb/modules/news/info.php	(revision 1217)
+++ branches/2.8.x/wb/modules/news/info.php	(revision 1218)
@@ -24,9 +24,9 @@
 */
 
 $module_directory = 'news';
-$module_name = 'News v3.1';
+$module_name = 'News v3.2';
 $module_function = 'page';
-$module_version = '3.1';
+$module_version = '3.2';
 $module_platform = '2.8.x';
 $module_author = 'Ryan Djurovich, Rob Smith';
 $module_license = 'GNU General Public License';
Index: branches/2.8.x/wb/modules/news/rss.php
===================================================================
--- branches/2.8.x/wb/modules/news/rss.php	(revision 1217)
+++ branches/2.8.x/wb/modules/news/rss.php	(revision 1218)
@@ -1,105 +1,97 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2009, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-// Check that GET values have been supplied
-if(isset($_GET['page_id']) AND is_numeric($_GET['page_id']))
-{
-	$page_id = $_GET['page_id'];
-	define('PAGE_ID', $page_id);
-}
-else
-{
-	header('Location: '.WB_URL);
-	exit( 0 );
-}
-if(isset($_GET['group_id']) AND is_numeric($_GET['group_id'])) {
-	$group_id = $_GET['group_id'];
-	define('GROUP_ID', $group_id);
-}
-
-// Include WB files
-require_once('../../config.php');
-require_once(WB_PATH.'/framework/class.frontend.php');
-$database = new database();
-$wb = new frontend();
-$wb->page_id = $page_id;
-$wb->get_page_details();
-$wb->get_website_settings();
-
-//checkout if a charset is defined otherwise use UTF-8
-if(defined('DEFAULT_CHARSET')) {
-	$charset=DEFAULT_CHARSET;
-} else {
-	$charset='utf-8';
-}
-
-// Sending XML header
-header("Content-type: text/xml; charset=$charset" );
-
-// Header info
-// Required by CSS 2.0
-echo '<?xml version="1.0" encoding="'.$charset.'"?>';
-?>
-<rss version="2.0">
-<channel>
-<title><?php echo PAGE_TITLE; ?></title>
-<link>http://<?php echo $_SERVER['SERVER_NAME']; ?></link>
-<description> <?php echo PAGE_DESCRIPTION; ?></description>
-<?php
-// Optional header info
-?>
-<language><?php echo strtolower(DEFAULT_LANGUAGE); ?></language>
-<copyright><?php $thedate = date('Y'); $websitetitle = WEBSITE_TITLE; echo "Copyright {$thedate}, {$websitetitle}"; ?></copyright>
-<managingEditor><?php echo SERVER_EMAIL; ?></managingEditor>
-<webMaster><?php echo SERVER_EMAIL; ?></webMaster>
-<category><?php echo WEBSITE_TITLE; ?></category>
-<generator>Website Baker Content Management System</generator>
-
-<?php
-// Get news items from database
-$t = TIME();
-$time_check_str= "(published_when = '0' OR published_when <= ".$t.") AND (published_until = 0 OR published_until >= ".$t.")";
-//Query
-if(isset($group_id)) {
-	$query = "SELECT * FROM ".TABLE_PREFIX."mod_news_posts WHERE group_id=".$group_id." AND page_id = ".$page_id." AND active=1 AND ".$time_check_str." ORDER BY posted_when DESC";
-} else {
-	$query = "SELECT * FROM ".TABLE_PREFIX."mod_news_posts WHERE page_id=".$page_id." AND active=1 AND ".$time_check_str." ORDER BY posted_when DESC";
-}
-$result = $database->query($query);
-
-//Generating the news items
-while($item = $result->fetchRow($result)){ ?>
-
-<item>
-<title><![CDATA[<?php echo stripslashes($item["title"]); ?>]]></title>
-<description><![CDATA[<?php echo stripslashes($item["content_short"]); ?>]]></description>
-<guid><?php echo WB_URL.PAGES_DIRECTORY.$item["link"].PAGE_EXTENSION; ?></guid>
-<link><?php echo WB_URL.PAGES_DIRECTORY.$item["link"].PAGE_EXTENSION; ?></link>
-</item>
-
-<?php } ?>
-
-</channel>
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2009, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+// Check that GET values have been supplied
+if(isset($_GET['page_id']) AND is_numeric($_GET['page_id'])) {
+	$page_id = $_GET['page_id'];
+} else {
+	header('Location: /');
+	exit(0);
+}
+if(isset($_GET['group_id']) AND is_numeric($_GET['group_id'])) {
+	$group_id = $_GET['group_id'];
+	define('GROUP_ID', $group_id);
+}
+
+// Include WB files
+require_once('../../config.php');
+require_once(WB_PATH.'/framework/class.frontend.php');
+$database = new database();
+$wb = new frontend();
+$wb->page_id = $page_id;
+$wb->get_page_details();
+$wb->get_website_settings();
+
+//checkout if a charset is defined otherwise use UTF-8
+if(defined('DEFAULT_CHARSET')) {
+	$charset=DEFAULT_CHARSET;
+} else {
+	$charset='utf-8';
+}
+
+// Sending XML header
+header("Content-type: text/xml; charset=$charset" );
+
+// Header info
+// Required by CSS 2.0
+echo '<?xml version="1.0" encoding="'.$charset.'"?>';
+?> 
+<rss version="2.0">
+	<channel>
+		<title><?php echo PAGE_TITLE; ?></title>
+		<link>http://<?php echo $_SERVER['SERVER_NAME']; ?></link>
+		<description> <?php echo PAGE_DESCRIPTION; ?></description>
+<?php
+// Optional header info 
+?>
+		<language><?php echo strtolower(DEFAULT_LANGUAGE); ?></language>
+		<copyright><?php $thedate = date('Y'); $websitetitle = WEBSITE_TITLE; echo "Copyright {$thedate}, {$websitetitle}"; ?></copyright>
+		<managingEditor><?php echo SERVER_EMAIL; ?></managingEditor>
+		<webMaster><?php echo SERVER_EMAIL; ?></webMaster>
+		<category><?php echo WEBSITE_TITLE; ?></category>
+		<generator>WebsiteBaker Content Management System</generator>
+<?php
+// Get news items from database
+$t = TIME();
+$time_check_str= "(published_when = '0' OR published_when <= ".$t.") AND (published_until = 0 OR published_until >= ".$t.")";
+//Query
+if(isset($group_id)) {
+	$query = "SELECT * FROM ".TABLE_PREFIX."mod_news_posts WHERE group_id=".$group_id." AND page_id = ".$page_id." AND active=1 AND ".$time_check_str." ORDER BY posted_when DESC";
+} else {
+	$query = "SELECT * FROM ".TABLE_PREFIX."mod_news_posts WHERE page_id=".$page_id." AND active=1 AND ".$time_check_str." ORDER BY posted_when DESC";	
+}
+$result = $database->query($query);
+
+//Generating the news items
+while($item = $result->fetchRow()){ ?>
+		<item>
+			<title><![CDATA[<?php echo stripslashes($item["title"]); ?>]]></title>
+			<description><![CDATA[<?php echo stripslashes($item["content_short"]); ?>]]></description>
+			<guid><?php echo WB_URL.PAGES_DIRECTORY.$item["link"].PAGE_EXTENSION; ?></guid>
+			<link><?php echo WB_URL.PAGES_DIRECTORY.$item["link"].PAGE_EXTENSION; ?></link>
+		</item>
+<?php } ?>
+	</channel>
 </rss>
\ No newline at end of file
