diff options
Diffstat (limited to 'plugins/RssWidget/Widgets/RssChangelog.php')
-rw-r--r-- | plugins/RssWidget/Widgets/RssChangelog.php | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/plugins/RssWidget/Widgets/RssChangelog.php b/plugins/RssWidget/Widgets/RssChangelog.php index 4f215fd6a6..9a58d0c367 100644 --- a/plugins/RssWidget/Widgets/RssChangelog.php +++ b/plugins/RssWidget/Widgets/RssChangelog.php @@ -20,20 +20,25 @@ class RssChangelog extends \Piwik\Widget\Widget $config->setName('Matomo Changelog'); } + private function getFeed($URL) { + $rss = new RssRenderer($URL); + $rss->setCountPosts(1); + $rss->showDescription(true); + $rss->showContent(false); + return $rss->get(); + } + public function render() - { + { try { - $rss = new RssRenderer('http://feeds.feedburner.com/PiwikReleases'); - $rss->setCountPosts(1); - $rss->showDescription(true); - $rss->showContent(false); - - return $rss->get(); - + return $this->getFeed('https://feeds.feedburner.com/PiwikReleases'); } catch (\Exception $e) { - - return $this->error($e); - } + try { + return $this->getFeed('http://feeds.feedburner.com/PiwikReleases'); + } catch (\Exception $e) { + return $this->error($e); + } + } } /** |