]> git.wh0rd.org - tt-rss.git/blobdiff - include/functions2.php
enable caching of media in article enclosures
[tt-rss.git] / include / functions2.php
index 9d6eb9330f07e385137b6264522a19ec2542f044..e00a0ba13305f15b0435cb1eed96c9b35a7f2e1b 100644 (file)
 
                if (db_num_rows($result) > 0) {
                        while ($line = db_fetch_assoc($result)) {
+
+                               if (file_exists(CACHE_DIR . '/images/' . sha1($line["content_url"]))) {
+                                       $line["content_url"] = get_self_url_prefix() . '/public.php?op=cached_url&hash=' . sha1($line["content_url"]);
+                               }
+
                                array_push($rv, $line);
                        }
                }