aboutsummaryrefslogtreecommitdiffstats
path: root/lib/news.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/news.php')
-rw-r--r--lib/news.php5
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();