diff options
Diffstat (limited to 'lib/news.php')
-rw-r--r-- | lib/news.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/news.php b/lib/news.php index 613103849..397c18b52 100644 --- a/lib/news.php +++ b/lib/news.php @@ -1,7 +1,7 @@ <?php /** */ - +date_default_timezone_set(@date_default_timezone_get()); /** * @param string $locale @@ -73,12 +73,14 @@ function get_feed($url, $count = 5, $cache_timeout = 5) { include_once G_APP_ROOT . '/lib/simplepie/simplepie.inc'; - $feed = new SimplePie($url, - realpath(G_APP_ROOT . '/var/tmp/cache'), - 3600 * $cache_timeout); + $feed = new SimplePie(); + $feed->set_feed_url($url); + $feed->set_cache_location(realpath(G_APP_ROOT . '/_nav/var/tmp/cache')); + $feed->set_cache_duration(3600 * $cache_timeout); $feed->set_timeout(2); $feed->enable_order_by_date(true); + $feed->init(); $feed->handle_content_type(); $items = array(); |