aboutsummaryrefslogtreecommitdiffstats
path: root/lib/news.php
diff options
context:
space:
mode:
authorfilip <filip.komar@gmail.com>2015-02-24 15:00:31 +0100
committerfilip <filip.komar@gmail.com>2015-02-24 15:00:31 +0100
commit56cd195fbd50ca92a574b4202793ada418b1f193 (patch)
tree158e0b3d4acd122623f7d458c6b47340bd05886c /lib/news.php
parent0723c390875cb343dcda42b183e866ac066324ed (diff)
downloadwww-56cd195fbd50ca92a574b4202793ada418b1f193.tar
www-56cd195fbd50ca92a574b4202793ada418b1f193.tar.gz
www-56cd195fbd50ca92a574b4202793ada418b1f193.tar.bz2
www-56cd195fbd50ca92a574b4202793ada418b1f193.tar.xz
www-56cd195fbd50ca92a574b4202793ada418b1f193.zip
update SimplePie to the latest version 1.3.1
Diffstat (limited to 'lib/news.php')
-rw-r--r--lib/news.php10
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();