From 21580853150b8bbae9381791d89ea3b19edc1429 Mon Sep 17 00:00:00 2001 From: Oliver Haase-Lobinger Date: Fri, 7 Jul 2017 11:29:51 +0200 Subject: [PATCH 1/2] Turning of the feeds to gain some more privacy --- _build/data/transport.core.system_settings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_build/data/transport.core.system_settings.php b/_build/data/transport.core.system_settings.php index 4a51d9354d3..3ad16212acf 100644 --- a/_build/data/transport.core.system_settings.php +++ b/_build/data/transport.core.system_settings.php @@ -549,7 +549,7 @@ $settings['feed_modx_news_enabled']= $xpdo->newObject('modSystemSetting'); $settings['feed_modx_news_enabled']->fromArray(array ( 'key' => 'feed_modx_news_enabled', - 'value' => '1', + 'value' => '0', 'xtype' => 'combo-boolean', 'namespace' => 'core', 'area' => 'system', @@ -567,7 +567,7 @@ $settings['feed_modx_security_enabled']= $xpdo->newObject('modSystemSetting'); $settings['feed_modx_security_enabled']->fromArray(array ( 'key' => 'feed_modx_security_enabled', - 'value' => '1', + 'value' => '0', 'xtype' => 'combo-boolean', 'namespace' => 'core', 'area' => 'system', From 8546726623281024b11c894397dc835f671cd4f6 Mon Sep 17 00:00:00 2001 From: mindeffects Date: Fri, 7 Jul 2017 15:09:27 +0200 Subject: [PATCH 2/2] fix-speedup-feed-dashboards --- .../default/dashboard/widget.modx-news.php | 16 ++++++++-------- .../default/dashboard/widget.modx-security.php | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/manager/controllers/default/dashboard/widget.modx-news.php b/manager/controllers/default/dashboard/widget.modx-news.php index 667e13e0914..12b47a28315 100644 --- a/manager/controllers/default/dashboard/widget.modx-news.php +++ b/manager/controllers/default/dashboard/widget.modx-news.php @@ -17,17 +17,17 @@ class modDashboardWidgetNewsFeed extends modDashboardWidgetInterface { * @return string */ public function render() { - $url = $this->modx->getOption('feed_modx_news'); - $feedHost = parse_url($url, PHP_URL_HOST); - if ($feedHost && function_exists('checkdnsrr') && !checkdnsrr($feedHost, 'A')) { - return ''; - } - $this->modx->loadClass('xmlrss.modRSSParser','',false,true); - $this->rss = new modRSSParser($this->modx); - $o = array(); + $url = $this->modx->getOption('feed_modx_news'); $newsEnabled = $this->modx->getOption('feed_modx_news_enabled',null,true); if (!empty($url) && !empty($newsEnabled)) { + $feedHost = parse_url($url, PHP_URL_HOST); + if ($feedHost && function_exists('checkdnsrr') && !checkdnsrr($feedHost, 'A')) { + return ''; + } + $this->modx->loadClass('xmlrss.modRSSParser','',false,true); + $this->rss = new modRSSParser($this->modx); + $rss = $this->rss->parse($url); if (is_object($rss)) { foreach (array_keys($rss->items) as $key) { diff --git a/manager/controllers/default/dashboard/widget.modx-security.php b/manager/controllers/default/dashboard/widget.modx-security.php index e685398c78a..79387aad7bc 100644 --- a/manager/controllers/default/dashboard/widget.modx-security.php +++ b/manager/controllers/default/dashboard/widget.modx-security.php @@ -14,17 +14,17 @@ class modDashboardWidgetSecurityFeed extends modDashboardWidgetInterface { public $rss; public function render() { - $url = $this->modx->getOption('feed_modx_security'); - $feedHost = parse_url($url, PHP_URL_HOST); - if ($feedHost && function_exists('checkdnsrr') && !checkdnsrr($feedHost, 'A')) { - return ''; - } - $this->modx->loadClass('xmlrss.modRSSParser','',false,true); - $this->rss = new modRSSParser($this->modx); - $o = array(); + $url = $this->modx->getOption('feed_modx_security'); $newsEnabled = $this->modx->getOption('feed_modx_security_enabled',null,true); if (!empty($url) && !empty($newsEnabled)) { + $feedHost = parse_url($url, PHP_URL_HOST); + if ($feedHost && function_exists('checkdnsrr') && !checkdnsrr($feedHost, 'A')) { + return ''; + } + $this->modx->loadClass('xmlrss.modRSSParser','',false,true); + $this->rss = new modRSSParser($this->modx); + $rss = $this->rss->parse($url); if (is_object($rss)) { foreach (array_keys($rss->items) as $key) {