]> git.wh0rd.org Git - tt-rss.git/commitdiff
add disabled option SIMPLEPIE_CACHE_IMAGES
authorAndrew Dolgov <fox@bah.spb.su>
Sat, 25 Aug 2007 17:23:41 +0000 (18:23 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sat, 25 Aug 2007 17:23:41 +0000 (18:23 +0100)
config.php-dist
functions.php

index a011b0d66d975939c8c209019f6c1f395fc4e1a8..3664254e5ca71c1f75f17b111e59e05a79b8c883 100644 (file)
        define('SIMPLEPIE_CACHE_DIR',   '/var/tmp/simplepie-ttrss-cache');
        // Cache directory for RSS feeds when using SimplePie
 
+       define('SIMPLEPIE_CACHE_IMAGES', false);
+       // Ignore this option for now on, it doesn't work yet.
+
+       // Cache feed images when using SimplePie. This will allow you to
+       // see images in feeds when originating server uses some sort of
+       // hotlink prevention at the expense of local bandwidth and
+       // disk space.
+
        define('COUNTERS_MAX_AGE', 365);
        // Hard limit for unread counters calculation. Try tweaking this
        // parameter to speed up tt-rss when having a huge number of articles
index 8cb2b5447897d386fb193f634df2ce4300e97b2c..d2f04216afe24e78f331792e057c165c91c0d458 100644 (file)
                }       
 
                // purge orphaned posts in main content table
-               db_query($link, "DELETE FROM ttrss_entries WHERE 
+               $result = db_query($link, "DELETE FROM ttrss_entries WHERE 
                        (SELECT COUNT(int_id) FROM ttrss_user_entries WHERE ref_id = id) = 0");
 
+               if ($do_output) {
+                       $rows = db_affected_rows($link, $result);
+                       _debug("Purged $rows orphaned posts.");
+               }
+
        }
 
        function purge_old_posts($link) {
                        $rss->set_feed_url($fetch_url);
                        $rss->set_output_encoding('UTF-8');
 
+/*                     if (SIMPLEPIE_CACHE_IMAGES) {
+                               $rss->set_image_handler('./image.php', 'i');
+                       } */
+
                        if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
                                _debug("feed update interval (sec): " .
                                        get_feed_update_interval($link, $feed)*60);