aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfilip <filip.komar@gmail.com>2018-08-03 16:43:33 +0200
committerfilip <filip.komar@gmail.com>2018-08-03 16:43:33 +0200
commitb20bba3a178f93401cbc69adf9c2bb3bdd4f735d (patch)
treeb492cfd2e85c9f59a1be6797d066fde656ec7746
parent10dc1e2cb4c4940981a3abd776350dc07f92fc3e (diff)
second part of a #mga23215 bugfix
Signed-off-by: filip <filip.komar@gmail.com>
-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();