From 3baeeeca6494d6ce0269eb3262c46624173eddd0 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 4 Nov 2006 14:38:01 +0100 Subject: drop feedcreator --- functions.php | 49 ++++++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 23 deletions(-) (limited to 'functions.php') diff --git a/functions.php b/functions.php index 368171727..d8d12f99f 100644 --- a/functions.php +++ b/functions.php @@ -19,10 +19,6 @@ require_once 'simplepie/simplepie.inc'; } - if (!DISABLE_SESSIONS) { - require_once "feedcreator.class.php"; - } - define('MAGPIE_OUTPUT_ENCODING', 'UTF-8'); function purge_feed($link, $feed_id, $purge_interval, $debug = false) { @@ -2364,7 +2360,7 @@ } function generate_syndicated_feed($link, $feed, $is_cat, - $search, $search_mode, $match_on, $output_format = "RSS2.0") { + $search, $search_mode, $match_on) { $qfh_ret = queryFeedHeadlines($link, $feed, 30, false, $is_cat, $search, $search_mode, $match_on, "updated DESC"); @@ -2374,24 +2370,31 @@ $feed_site_url = $qfh_ret[2]; $last_error = $qfh_ret[3]; - $rss = new UniversalFeedCreator(); - - $rss->title = $feed_title; - $rss->link = $feed_site_url; - - while ($line = db_fetch_assoc($result)) { - - $item = new FeedItem(); - $item->title = $line["title"]; - $item->description = $line["content_preview"]; - $item->date = strtotime($line["updated"]); - $item->guid = $line["guid"]; - $item->link = $line['link']; - - $rss->addItem($item); - } - - print $rss->createFeed($output_format); + print " + + $feed_title + $feed_site_url + Tiny Tiny RSS v".VERSION.""; + + while ($line = db_fetch_assoc($result)) { + print ""; + print "" . htmlspecialchars($line["guid"]) . ""; + print "" . htmlspecialchars($line["link"]) . ""; + + $rfc822_date = date('r', strtotime($line["updated"])); + + print "$rfc822_date"; + + print "" . + htmlspecialchars($line["title"]) . ""; + + print "" . + htmlspecialchars($line["content_preview"]) . ""; + + print ""; + } + + print ""; } -- cgit v1.2.3