From: Andrew Dolgov Date: Sun, 12 Feb 2006 05:34:27 +0000 (+0100) Subject: fix negative update interval handling X-Git-Tag: 1.1.3~37 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=c1e202b79c6a17c9d2117725322baa5b8c662765;p=tt-rss.git fix negative update interval handling --- diff --git a/functions.php b/functions.php index 2e25b950..d502d08d 100644 --- a/functions.php +++ b/functions.php @@ -125,6 +125,11 @@ $upd_intl = get_pref($link, 'DEFAULT_UPDATE_INTERVAL', $user_id); } + if ($upd_intl < 0) { + // Updates for this feed are disabled + continue; + } + if ($fetch || (!$line["last_updated"] || time() - strtotime($line["last_updated"]) > ($upd_intl * 60))) { diff --git a/update_daemon.php b/update_daemon.php index 37c42ba1..83476589 100644 --- a/update_daemon.php +++ b/update_daemon.php @@ -59,9 +59,14 @@ if (!$upd_intl || $upd_intl == 0) { $upd_intl = get_pref($link, 'DEFAULT_UPDATE_INTERVAL', $user_id); } + + if ($upd_intl < 0) { + print "Updates disabled.\n"; + continue; + } - # printf("%d ? %d\n", time() - strtotime($line["last_updated"]) > $upd_intl*60, - # $upd_intl*60); + printf("%d ? %d\n", time() - strtotime($line["last_updated"]) > $upd_intl*60, + $upd_intl*60); if (!$line["last_updated"] || time() - strtotime($line["last_updated"]) > ($upd_intl * 60)) {