From 50b2db963224d0912aec136548965715f626f1b7 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 22 Jan 2009 08:40:16 +0100 Subject: [PATCH] catchup feed on first update after adding --- functions.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/functions.php b/functions.php index e7e7d8ca..ef0fc4e6 100644 --- a/functions.php +++ b/functions.php @@ -573,7 +573,7 @@ } else { $result = db_query($link, "SELECT id,update_interval,auth_login, - auth_pass,cache_images,update_method,hidden + auth_pass,cache_images,update_method,hidden,last_updated FROM ttrss_feeds WHERE id = '$feed'"); } @@ -587,6 +587,7 @@ $hidden = sql_bool_to_bool(db_fetch_result($result, 0, "hidden")); $update_method = db_fetch_result($result, 0, "update_method"); + $last_updated = db_fetch_result($result, 0, "last_updated"); db_query($link, "UPDATE ttrss_feeds SET last_update_started = NOW() WHERE id = '$feed'"); @@ -1434,6 +1435,13 @@ } } + if (!$last_updated) { + if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) { + _debug("update_rss_feed: new feed, catching it up..."); + } + catchup_feed($link, $feed, false); + } + if (!$hidden) { if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) { _debug("update_rss_feed: updating counters cache..."); -- 2.39.5