diff options
author | Andrew Dolgov <[email protected]> | 2009-01-22 08:40:16 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2009-01-22 08:40:16 +0100 |
commit | 50b2db963224d0912aec136548965715f626f1b7 (patch) | |
tree | f5701fd269d9f1752bf26b874a077a55c2635e64 | |
parent | ab954dffad6886d613a4f973d3b70b3361306f09 (diff) |
catchup feed on first update after adding
-rw-r--r-- | functions.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/functions.php b/functions.php index e7e7d8ca5..ef0fc4e6c 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..."); |