summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2007-08-26 05:00:30 +0100
committerAndrew Dolgov <[email protected]>2007-08-26 05:00:30 +0100
commitbc0f07856012aa94eaea7c409e720d73f2fba0c3 (patch)
treed7f6c1b7ea87b14660a5af2b7f69168bb53e087a /functions.php
parentfb67e2ba58b08f150c383664c0b6796d56254d5d (diff)
enable caching of images
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/functions.php b/functions.php
index d2f04216a..c321f9b4f 100644
--- a/functions.php
+++ b/functions.php
@@ -430,13 +430,14 @@
_debug("update_rss_feed: start");
}
- $result = db_query($link, "SELECT update_interval,auth_login,auth_pass
+ $result = db_query($link, "SELECT update_interval,auth_login,auth_pass,cache_images
FROM ttrss_feeds WHERE id = '$feed'");
$auth_login = db_fetch_result($result, 0, "auth_login");
$auth_pass = db_fetch_result($result, 0, "auth_pass");
$update_interval = db_fetch_result($result, 0, "update_interval");
+ $cache_images = sql_bool_to_bool(db_fetch_result($result, 0, "cache_images"));
if ($update_interval < 0) { return; }
@@ -475,9 +476,13 @@
$rss->set_feed_url($fetch_url);
$rss->set_output_encoding('UTF-8');
-/* if (SIMPLEPIE_CACHE_IMAGES) {
+ if (SIMPLEPIE_CACHE_IMAGES && $cache_images) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ _debug("enabling image cache");
+ }
+
$rss->set_image_handler('./image.php', 'i');
- } */
+ }
if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
_debug("feed update interval (sec): " .