diff options
author | Andrew Dolgov <[email protected]> | 2021-03-01 13:43:37 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-03-01 13:43:37 +0300 |
commit | 320503dd3911de93d059ebe1ba8b96004d8f6b03 (patch) | |
tree | ce44d5c6b8ed3a6cd54d2bb7dda47445f1b2f688 /classes/rssutils.php | |
parent | 20a844085f42975a9e2d20a9cd489a0251d52ad5 (diff) |
move version-related stuff to Config; fix conditional feed requests
Diffstat (limited to 'classes/rssutils.php')
-rwxr-xr-x | classes/rssutils.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/classes/rssutils.php b/classes/rssutils.php index d9f97e602..73ddaa235 100755 --- a/classes/rssutils.php +++ b/classes/rssutils.php @@ -458,8 +458,6 @@ class RSSUtils { Debug::log("local cache will not be used for this feed", Debug::$LOG_VERBOSE); } - global $fetch_last_modified; - // fetch feed from source if (!$feed_data) { Debug::log("last unconditional update request: $last_unconditional", Debug::$LOG_VERBOSE); @@ -490,11 +488,11 @@ class RSSUtils { Debug::log("fetch done.", Debug::$LOG_VERBOSE); Debug::log("effective URL (after redirects): " . clean(UrlHelper::$fetch_effective_url) . " (IP: ".UrlHelper::$fetch_effective_ip_addr.")", Debug::$LOG_VERBOSE); - Debug::log("source last modified: " . $fetch_last_modified, Debug::$LOG_VERBOSE); + Debug::log("source last modified: " . UrlHelper::$fetch_last_modified, Debug::$LOG_VERBOSE); - if ($feed_data && $fetch_last_modified != $stored_last_modified) { + if ($feed_data && UrlHelper::$fetch_last_modified != $stored_last_modified) { $sth = $pdo->prepare("UPDATE ttrss_feeds SET last_modified = ? WHERE id = ?"); - $sth->execute([substr($fetch_last_modified, 0, 245), $feed]); + $sth->execute([substr(UrlHelper::$fetch_last_modified, 0, 245), $feed]); } // cache vanilla feed data for re-use |