diff options
author | Andrew Dolgov <[email protected]> | 2008-01-24 04:54:45 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2008-01-24 04:54:45 +0100 |
commit | 39a5249904b186a164bc47fcb19317389469c674 (patch) | |
tree | 939174086b8be2afa48ca00690bf81c7a9ad021d /functions.php | |
parent | 68dcbd31d82de112e3c827ae6871490d0f9967e9 (diff) |
update_daemon2: fix the never-update bug
Diffstat (limited to 'functions.php')
-rw-r--r-- | functions.php | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/functions.php b/functions.php index 42c5c277c..5ab98829c 100644 --- a/functions.php +++ b/functions.php @@ -469,15 +469,25 @@ _debug("update_rss_feed: start"); } - if (DB_TYPE == "pgsql") { - $updstart_thresh_qpart = "(ttrss_feeds.last_update_started IS NULL OR ttrss_feeds.last_update_started < NOW() - INTERVAL '120 seconds')"; - } else { - $updstart_thresh_qpart = "(ttrss_feeds.last_update_started IS NULL OR ttrss_feeds.last_update_started < DATE_SUB(NOW(), INTERVAL 120 SECOND))"; - } + if (!$ignore_daemon) { + + if (DB_TYPE == "pgsql") { + $updstart_thresh_qpart = "(ttrss_feeds.last_update_started IS NULL OR ttrss_feeds.last_update_started < NOW() - INTERVAL '120 seconds')"; + } else { + $updstart_thresh_qpart = "(ttrss_feeds.last_update_started IS NULL OR ttrss_feeds.last_update_started < DATE_SUB(NOW(), INTERVAL 120 SECOND))"; + } + + $result = db_query($link, "SELECT id,update_interval,auth_login, + auth_pass,cache_images + FROM ttrss_feeds WHERE id = '$feed' AND $updstart_thresh_qpart"); + + } else { - $result = db_query($link, "SELECT id,update_interval,auth_login, - auth_pass,cache_images - FROM ttrss_feeds WHERE id = '$feed' AND $updstart_thresh_qpart"); + $result = db_query($link, "SELECT id,update_interval,auth_login, + auth_pass,cache_images + FROM ttrss_feeds WHERE id = '$feed'"); + + } if (db_num_rows($result) == 0) { if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) { |