[Openfirst-cvscommit] news/rss rss.php,1.8,1.9
Brought to you by:
xtimg
From: <i-...@us...> - 2004-01-19 23:49:46
|
Update of /cvsroot/openfirst/news/rss In directory sc8-pr-cvs1:/tmp/cvs-serv9231/news/rss Modified Files: rss.php Log Message: Fixed bug with special characters such as Index: rss.php =================================================================== RCS file: /cvsroot/openfirst/news/rss/rss.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** rss.php 24 Dec 2003 03:24:10 -0000 1.8 --- rss.php 19 Jan 2004 23:49:40 -0000 1.9 *************** *** 80,96 **** // Data for a single RSS item ! $query = ofirst_dbquery("SELECT * FROM ofirst_news LIMIT ".$limit); while($news = ofirst_dbfetch_object($query)){ ! $about = $link = $home.$base.'/news/readnews.php?ID='.$news->ID; $title = strip_tags($news->title); ! $description = strip_tags($news->news); $subject = (string) ''; // optional DC value ! $date = (string) date('Y-m-d\TH:i:sO'); // optional DC value $author = (string) $news->poster; // author of item $comments = (string) ''; // url to comment page rss 2.0 value $image = (string) $news->image; // optional mod_im value for dispaying a different pic for every item ! $rssfile->addItem($about, $title, $link, $description, $subject, $date, $author, $comments, $image); } --- 80,103 ---- // Data for a single RSS item ! $query = ofirst_dbquery("SELECT * FROM ofirst_news ORDER BY `date` LIMIT ".$limit); while($news = ofirst_dbfetch_object($query)){ ! $about = $link = $home.'/news/readnews.php?ID='.$news->ID; $title = strip_tags($news->title); ! if (function_exists('html_entity_decode')){ ! $description = html_entity_decode(strip_tags($news->news)); ! } else { ! $description = str_replace(' ',' ',strip_tags($news->news)); ! } $subject = (string) ''; // optional DC value ! $timestamp=strtotime($news->date); ! if ($timestamp!=-1){ ! $date = (string) date('Y-m-d\TH:i:sO',$timestamp); ! } $author = (string) $news->poster; // author of item $comments = (string) ''; // url to comment page rss 2.0 value $image = (string) $news->image; // optional mod_im value for dispaying a different pic for every item ! $rssfile->addItem($about, $title, $link, $description, $subject, $date, $author, $comments, $image); } *************** *** 104,108 **** $version = "2.0"; } ! $rssfile->outputRSS($version); ob_end_flush(); --- 111,115 ---- $version = "2.0"; } ! $rssfile->outputRSS($version); ob_end_flush(); |