]> git.wh0rd.org - tt-rss.git/commitdiff
fix negative update interval handling
authorAndrew Dolgov <fox@madoka.spb.ru>
Sun, 12 Feb 2006 05:34:27 +0000 (06:34 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Sun, 12 Feb 2006 05:34:27 +0000 (06:34 +0100)
functions.php
update_daemon.php

index 2e25b95003bce4e1dd2985bc44b44b34e9cb5845..d502d08d4a4b86348d8c00a07fcc1f9bb9fa4de2 100644 (file)
                                $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))) {
 
index 37c42ba1b8832c878932254c91a23661556757f9..834765894493eeca03afcd530614d4e07fe0197a 100644 (file)
                        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)) {