]> git.wh0rd.org Git - tt-rss.git/commitdiff
disable sync feed updates for feeds with cache_images set
authorAndrew Dolgov <fox@fakecake.org>
Mon, 29 Oct 2012 08:10:05 +0000 (12:10 +0400)
committerAndrew Dolgov <fox@fakecake.org>
Mon, 29 Oct 2012 08:10:05 +0000 (12:10 +0400)
classes/feeds.php

index d13c83a23b17fa3fca3dc82439716fb2e59052fd..d99aea7c6cd840c78be960f655702cfedbe0775d 100644 (file)
@@ -152,12 +152,14 @@ class Feeds extends Handler_Protected {
                        // Update the feed if required with some basic flood control\r
 \r
                        $result = db_query($this->link,\r
-                               "SELECT ".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated\r
+                               "SELECT cache_images,".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated\r
                                        FROM ttrss_feeds WHERE id = '$feed'");\r
 \r
                                if (db_num_rows($result) != 0) {\r
                                        $last_updated = strtotime(db_fetch_result($result, 0, "last_updated"));\r
-                                       if (time() - $last_updated > 120) {\r
+                                       $cache_images = sql_bool_to_bool(db_fetch_result($result, 0, "cache_images"));\r
+\r
+                                       if (!$cache_images && time() - $last_updated > 120) {\r
                                                include "rssfuncs.php";\r
                                                update_rss_feed($this->link, $feed, true, true);\r
                                        }\r