]> git.wh0rd.org Git - tt-rss.git/commitdiff
when checking feeds to update, respect only default update setting stored in default...
authorAndrew Dolgov <fox@fakecake.org>
Wed, 18 Dec 2013 09:55:50 +0000 (13:55 +0400)
committerAndrew Dolgov <fox@fakecake.org>
Wed, 18 Dec 2013 09:55:50 +0000 (13:55 +0400)
include/rssfuncs.php

index 43d931fc8bf035c27cadd40497373a550acc8390..92bd9f0333e0f9d706e2956fee5d836e106bdf7f 100644 (file)
                                ) OR (
                                        ttrss_feeds.update_interval > 0
                                        AND ttrss_feeds.last_updated < NOW() - CAST((ttrss_feeds.update_interval || ' minutes') AS INTERVAL)
-                               ) OR ttrss_feeds.last_updated IS NULL
-                               OR last_updated = '1970-01-01 00:00:00')";
+                               ) OR (ttrss_feeds.last_updated IS NULL
+                                       AND ttrss_user_prefs.value != '-1')
+                               OR (last_updated = '1970-01-01 00:00:00'
+                                       AND ttrss_user_prefs.value != '-1'))";
                } else {
                        $update_limit_qpart = "AND ((
                                        ttrss_feeds.update_interval = 0
                                ) OR (
                                        ttrss_feeds.update_interval > 0
                                        AND ttrss_feeds.last_updated < DATE_SUB(NOW(), INTERVAL ttrss_feeds.update_interval MINUTE)
-                               ) OR ttrss_feeds.last_updated IS NULL
-                               OR last_updated = '1970-01-01 00:00:00')";
+                               ) OR (ttrss_feeds.last_updated IS NULL
+                                       AND ttrss_user_prefs.value != '-1')
+                               OR (last_updated = '1970-01-01 00:00:00'
+                                       AND ttrss_user_prefs.value != '-1'))";
                }
 
                // Test if feed is currently being updated by another process.
                                ttrss_feeds, ttrss_users, ttrss_user_prefs
                        WHERE
                                ttrss_feeds.owner_uid = ttrss_users.id
+                               AND ttrss_user_prefs.profile IS NULL
                                AND ttrss_users.id = ttrss_user_prefs.owner_uid
                                AND ttrss_user_prefs.pref_name = 'DEFAULT_UPDATE_INTERVAL'
                                $login_thresh_qpart $update_limit_qpart
                                ttrss_user_prefs.owner_uid = ttrss_feeds.owner_uid AND
                                ttrss_users.id = ttrss_user_prefs.owner_uid AND
                                ttrss_user_prefs.pref_name = 'DEFAULT_UPDATE_INTERVAL' AND
+                               ttrss_user_prefs.profile IS NULL AND
                                feed_url = '".db_escape_string($feed)."' AND
                                (ttrss_feeds.update_interval > 0 OR
                                        ttrss_user_prefs.value != '-1')
 
                                while ($tline = db_fetch_assoc($tmp_result)) {
                                        if($debug) _debug(" => " . $tline["last_updated"] . ", " . $tline["id"] . " " . $tline["owner_uid"]);
+
                                        $rss = update_rss_feed($tline["id"], true, false, $rss);
                                        _debug_suppress(false);
                                        ++$nf;