fix negative update interval handling

This commit is contained in:
Andrew Dolgov 2006-02-12 06:34:27 +01:00
parent b8a6ff3044
commit c1e202b79c
2 changed files with 12 additions and 2 deletions

View File

@ -125,6 +125,11 @@
$upd_intl = get_pref($link, 'DEFAULT_UPDATE_INTERVAL', $user_id); $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"] || if ($fetch || (!$line["last_updated"] ||
time() - strtotime($line["last_updated"]) > ($upd_intl * 60))) { time() - strtotime($line["last_updated"]) > ($upd_intl * 60))) {

View File

@ -60,8 +60,13 @@
$upd_intl = get_pref($link, 'DEFAULT_UPDATE_INTERVAL', $user_id); $upd_intl = get_pref($link, 'DEFAULT_UPDATE_INTERVAL', $user_id);
} }
# printf("%d ? %d\n", time() - strtotime($line["last_updated"]) > $upd_intl*60, if ($upd_intl < 0) {
# $upd_intl*60); print "Updates disabled.\n";
continue;
}
printf("%d ? %d\n", time() - strtotime($line["last_updated"]) > $upd_intl*60,
$upd_intl*60);
if (!$line["last_updated"] || if (!$line["last_updated"] ||
time() - strtotime($line["last_updated"]) > ($upd_intl * 60)) { time() - strtotime($line["last_updated"]) > ($upd_intl * 60)) {