]> git.wh0rd.org Git - tt-rss.git/commitdiff
update_daemon2: fix the never-update bug
authorAndrew Dolgov <fox@madoka.spb.ru>
Thu, 24 Jan 2008 03:54:45 +0000 (04:54 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Thu, 24 Jan 2008 03:54:45 +0000 (04:54 +0100)
functions.php

index 42c5c277caecc492318f2e43d62f229a1f6b127b..5ab98829c0a9f2f41866d3e11f4e5de1c1f69351 100644 (file)
                        _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']) {