diff options
author | filip <filip.komar@gmail.com> | 2018-08-03 16:43:33 +0200 |
---|---|---|
committer | filip <filip.komar@gmail.com> | 2018-08-03 16:43:33 +0200 |
commit | b20bba3a178f93401cbc69adf9c2bb3bdd4f735d (patch) | |
tree | b492cfd2e85c9f59a1be6797d066fde656ec7746 /lib/news.php | |
parent | 10dc1e2cb4c4940981a3abd776350dc07f92fc3e (diff) | |
download | www-b20bba3a178f93401cbc69adf9c2bb3bdd4f735d.tar www-b20bba3a178f93401cbc69adf9c2bb3bdd4f735d.tar.gz www-b20bba3a178f93401cbc69adf9c2bb3bdd4f735d.tar.bz2 www-b20bba3a178f93401cbc69adf9c2bb3bdd4f735d.tar.xz www-b20bba3a178f93401cbc69adf9c2bb3bdd4f735d.zip |
second part of a #mga23215 bugfix
Signed-off-by: filip <filip.komar@gmail.com>
Diffstat (limited to 'lib/news.php')
-rw-r--r-- | lib/news.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/news.php b/lib/news.php index 36749bdda..a67ad5f8d 100644 --- a/lib/news.php +++ b/lib/news.php @@ -63,14 +63,15 @@ function get_news($locale = 'en', $count = 5, $cache_timeout = 5) */ function get_feed($url, $count = 5, $cache_timeout = 5) { - include_once G_APP_ROOT . '/lib/simplepie/simplepie.inc'; + include_once G_APP_ROOT . '/lib/simplepie/autoloader.php'; $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->set_timeout(10); // second part of a #mga23215 bugfix + $feed->force_cache_fallback(true); // this should help if rss files are not retrievable $feed->enable_order_by_date(true); $feed->init(); $feed->handle_content_type(); |