]> git.wh0rd.org - tt-rss.git/blobdiff - include/rssfuncs.php
implement stop action
[tt-rss.git] / include / rssfuncs.php
index 3bce14d33ab8786bd3b67bb8b7aa6a0a94fbbef8..e3b1e44b21649040b3a9bdb0e5cf4bc1eb888a1c 100644 (file)
                                        _debug("update_rss_feed: fetching [$fetch_url] (ts: $cache_timestamp/$last_updated_timestamp)");
                                }
 
+                               $force_refetch = isset($_REQUEST["force_refetch"]);
+
                                $feed_data = fetch_file_contents($fetch_url, false,
                                        $auth_login, $auth_pass, false, $no_cache ? 15 : 45,
-                                       max($last_updated_timestamp, $cache_timestamp));
+                                       $force_refetch ? 0 : max($last_updated_timestamp, $cache_timestamp));
 
                                if ($debug_enabled) {
                                        _debug("update_rss_feed: fetch done.");
                        if ($filter_match) {
                                foreach ($filter["actions"] AS $action) {
                                        array_push($matches, $action);
+
+                                       // if Stop action encountered, perform no further processing
+                                       if ($action["type"] == "stop") return $matches;
                                }
                        }
                }