|
|
|
@ -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 "<rss version=\"2.0\">
|
|
|
|
|
<channel>
|
|
|
|
|
<title>$feed_title</title>
|
|
|
|
|
<link>$feed_site_url</link>
|
|
|
|
|
<generator>Tiny Tiny RSS v".VERSION."</generator>";
|
|
|
|
|
|
|
|
|
|
while ($line = db_fetch_assoc($result)) {
|
|
|
|
|
print "<item>";
|
|
|
|
|
print "<id>" . htmlspecialchars($line["guid"]) . "</id>";
|
|
|
|
|
print "<link>" . htmlspecialchars($line["link"]) . "</link>";
|
|
|
|
|
|
|
|
|
|
$rfc822_date = date('r', strtotime($line["updated"]));
|
|
|
|
|
|
|
|
|
|
print "<pubDate>$rfc822_date</pubDate>";
|
|
|
|
|
|
|
|
|
|
print "<title>" .
|
|
|
|
|
htmlspecialchars($line["title"]) . "</title>";
|
|
|
|
|
|
|
|
|
|
print "<description>" .
|
|
|
|
|
htmlspecialchars($line["content_preview"]) . "</description>";
|
|
|
|
|
|
|
|
|
|
print "</item>";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
print "</channel></rss>";
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|