summaryrefslogtreecommitdiff
path: root/update_daemon.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2006-02-12 06:34:27 +0100
committerAndrew Dolgov <[email protected]>2006-02-12 06:34:27 +0100
commitc1e202b79c6a17c9d2117725322baa5b8c662765 (patch)
treececcbb043f0a333b88d0c2626bc46d5940c2ad32 /update_daemon.php
parentb8a6ff3044764eeb631453da51555e0a578d68fb (diff)
fix negative update interval handling
Diffstat (limited to 'update_daemon.php')
-rw-r--r--update_daemon.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/update_daemon.php b/update_daemon.php
index 37c42ba1b..834765894 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)) {