return;
}
- if (defined('DAEMON_EXTENDED_DEBUG')) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
_debug("update_rss_feed: start");
}
}
- if (defined('DAEMON_EXTENDED_DEBUG')) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
_debug("update_rss_feed: fetching...");
}
$rss = fetch_rss($fetch_url);
- if (defined('DAEMON_EXTENDED_DEBUG')) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
_debug("update_rss_feed: fetch done, parsing...");
} else {
error_reporting (DEFAULT_ERROR_LEVEL);
if ($rss) {
- if (defined('DAEMON_EXTENDED_DEBUG')) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
_debug("update_rss_feed: processing feed data...");
}
$owner_uid = db_fetch_result($result, 0, "owner_uid");
if (get_pref($link, 'ENABLE_FEED_ICONS', $owner_uid, false)) {
- if (defined('DAEMON_EXTENDED_DEBUG')) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
_debug("update_rss_feed: checking favicon...");
}
check_feed_favicon($rss->channel["link"], $feed, $link);
}
if (!$registered_title || $registered_title == "[Unknown]") {
-
+
$feed_title = db_escape_string($rss->channel["title"]);
+
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ _debug("update_rss_feed: registering title: $feed_title");
+ }
db_query($link, "UPDATE ttrss_feeds SET
title = '$feed_title' WHERE id = '$feed'");
db_query($link, "UPDATE ttrss_feeds SET icon_url = '$icon_url' WHERE id = '$feed'");
}
- if (defined('DAEMON_EXTENDED_DEBUG')) {
+ if (defined('DAEMON_EXTENDED_DEBUG' || $_GET['xdebug'])) {
_debug("update_rss_feed: loading filters...");
}
function http_authenticate_user($link) {
+ error_log("http_authenticate_user: ".$_SERVER["PHP_AUTH_USER"]."\n", 3, '/tmp/tt-rss.log');
+
if (!$_SERVER["PHP_AUTH_USER"]) {
header('WWW-Authenticate: Basic realm="Tiny Tiny RSS RSSGen"');
$feed_site_url = $qfh_ret[2];
$last_error = $qfh_ret[3];
+# if (!$feed_site_url) $feed_site_url = "http://localhost/";
+
print "<rss version=\"2.0\">
<channel>
<title>$feed_title</title>
- <link>$feed_site_url</link>
- <generator>Tiny Tiny RSS v".VERSION."</generator>";
+ <link>$feed_site_url</link>
+ <description>Feed generated by Tiny Tiny RSS</description>";
while ($line = db_fetch_assoc($result)) {
print "<item>";
- print "<id>" . htmlspecialchars($line["guid"]) . "</id>";
+ print "<guid>" . htmlspecialchars($line["guid"]) . "</guid>";
print "<link>" . htmlspecialchars($line["link"]) . "</link>";
$tags = get_article_tags($link, $line["id"]);