From 61e420e964cea6e70d445a872f88ca5a56fc31d0 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 12 Apr 2011 19:44:39 +0400 Subject: config: cleanup --- functions.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'functions.php') diff --git a/functions.php b/functions.php index bccb99d2a..b56fd3ac4 100644 --- a/functions.php +++ b/functions.php @@ -611,11 +611,15 @@ define('MAGPIE_CACHE_AGE', get_feed_update_interval($link, $feed) * 60); define('MAGPIE_CACHE_ON', !$no_cache); + define('MAGPIE_FETCH_TIME_OUT', 60); + define('MAGPIE_CACHE_DIR', CACHE_DIR . "/magpie"); $rss = @fetch_rss($fetch_url); } else { - if (!is_dir(SIMPLEPIE_CACHE_DIR)) { - mkdir(SIMPLEPIE_CACHE_DIR); + $simplepie_cache_dir = CACHE_DIR . "/simplepie"; + + if (!is_dir($simplepie_cache_dir)) { + mkdir($simplepie_cache_dir); } $rss = new SimplePie(); @@ -641,7 +645,7 @@ $rss->enable_cache(!$no_cache); if (!$no_cache) { - $rss->set_cache_location(SIMPLEPIE_CACHE_DIR); + $rss->set_cache_location($simplepie_cache_dir); $rss->set_cache_duration(get_feed_update_interval($link, $feed) * 60); } -- cgit v1.2.3-54-g00ecf