diff --git a/functions.php b/functions.php index 4257184c1..4f7bc336e 100644 --- a/functions.php +++ b/functions.php @@ -379,7 +379,7 @@ return; } - if (defined('DAEMON_EXTENDED_DEBUG')) { + if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) { _debug("update_rss_feed: start"); } @@ -407,7 +407,7 @@ } - if (defined('DAEMON_EXTENDED_DEBUG')) { + if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) { _debug("update_rss_feed: fetching..."); } @@ -417,7 +417,7 @@ $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); @@ -427,7 +427,7 @@ if ($rss) { - if (defined('DAEMON_EXTENDED_DEBUG')) { + if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) { _debug("update_rss_feed: processing feed data..."); } @@ -443,15 +443,19 @@ $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'"); @@ -475,7 +479,7 @@ 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..."); } @@ -1192,6 +1196,8 @@ 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"'); @@ -2676,15 +2682,17 @@ $feed_site_url = $qfh_ret[2]; $last_error = $qfh_ret[3]; +# if (!$feed_site_url) $feed_site_url = "http://localhost/"; + print " $feed_title - $feed_site_url - Tiny Tiny RSS v".VERSION.""; + $feed_site_url + Feed generated by Tiny Tiny RSS"; while ($line = db_fetch_assoc($result)) { print ""; - print "" . htmlspecialchars($line["guid"]) . ""; + print "" . htmlspecialchars($line["guid"]) . ""; print "" . htmlspecialchars($line["link"]) . ""; $tags = get_article_tags($link, $line["id"]);