Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/RssWidget/Widgets/RssPiwik.php')
-rw-r--r--plugins/RssWidget/Widgets/RssPiwik.php21
1 files changed, 13 insertions, 8 deletions
diff --git a/plugins/RssWidget/Widgets/RssPiwik.php b/plugins/RssWidget/Widgets/RssPiwik.php
index 9cf78247a0..2234488c49 100644
--- a/plugins/RssWidget/Widgets/RssPiwik.php
+++ b/plugins/RssWidget/Widgets/RssPiwik.php
@@ -20,18 +20,23 @@ class RssPiwik extends \Piwik\Widget\Widget
$config->setName('Matomo.org Blog');
}
+ private function getFeed($URL){
+ $rss = new RssRenderer($URL);
+ $rss->showDescription(true);
+ return $rss->get();
+ }
+
public function render()
{
try {
- $rss = new RssRenderer('http://feeds.feedburner.com/Piwik');
- $rss->showDescription(true);
-
- return $rss->get();
-
+ return $this->getFeed('https://feeds.feedburner.com/Piwik');
} catch (\Exception $e) {
-
- return $this->error($e);
- }
+ try {
+ return $this->getFeed('http://feeds.feedburner.com/Piwik');
+ } catch (\Exception $e) {
+ return $this->error($e);
+ }
+ }
}
/**