summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2007-07-18 12:04:43 +0100
committerAndrew Dolgov <[email protected]>2007-07-18 12:04:43 +0100
commit4bc6480705eb482852d26d01c8a313d2c5965273 (patch)
tree37927d95356bcf668fc4d3d9a018e9abc19631ba /functions.php
parent237ec2ad9c0ac3e0fa1515699ebaa1df41405378 (diff)
extend parse debugging, fix syndicated feed format
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php28
1 files changed, 18 insertions, 10 deletions
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 "<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"]);