diff options
author | Martin Keckeis <martin.keckeis1@gmail.com> | 2017-06-19 14:39:29 +0300 |
---|---|---|
committer | Stefan Giehl <stefan@piwik.org> | 2017-06-19 14:39:29 +0300 |
commit | 22b48527b826434ab0fb500160aa4ce17ebfd34a (patch) | |
tree | 8d289917ad81968f5502a4655afa19e5f4dbefcf /plugins/CoreAdminHome | |
parent | 14047e5c6475636ddf0691675b2deaab5ae285ba (diff) |
disable outgoing communication with one setting (#11465)
* disable outgoing communication with one setting
* disabled piwik blog if isInternetEnabled=0
* better description for enable_internet_features
* reenable plugin
Diffstat (limited to 'plugins/CoreAdminHome')
-rw-r--r-- | plugins/CoreAdminHome/Controller.php | 4 | ||||
-rw-r--r-- | plugins/CoreAdminHome/Tasks.php | 5 | ||||
-rw-r--r-- | plugins/CoreAdminHome/templates/home.twig | 6 |
3 files changed, 11 insertions, 4 deletions
diff --git a/plugins/CoreAdminHome/Controller.php b/plugins/CoreAdminHome/Controller.php index 3b96590946..8ca2d69077 100644 --- a/plugins/CoreAdminHome/Controller.php +++ b/plugins/CoreAdminHome/Controller.php @@ -27,6 +27,7 @@ use Piwik\Translation\Translator; use Piwik\Url; use Piwik\View; use Piwik\Widget\WidgetsList; +use Piwik\SettingsPiwik; class Controller extends ControllerAdmin { @@ -48,6 +49,8 @@ class Controller extends ControllerAdmin public function home() { + $isInternetEnabled = SettingsPiwik::isInternetEnabled(); + $isMarketplaceEnabled = Marketplace::isMarketplaceEnabled(); $isFeedbackEnabled = Plugin\Manager::getInstance()->isPluginLoaded('Feedback'); $widgetsList = WidgetsList::get(); @@ -59,6 +62,7 @@ class Controller extends ControllerAdmin $hasDiagnostics = $widgetsList->isDefined('Installation', 'getSystemCheck'); return $this->renderTemplate('home', array( + 'isInternetEnabled' => $isInternetEnabled, 'isMarketplaceEnabled' => $isMarketplaceEnabled, 'hasPremiumFeatures' => $hasPremiumFeatures, 'hasNewPlugins' => $hasNewPlugins, diff --git a/plugins/CoreAdminHome/Tasks.php b/plugins/CoreAdminHome/Tasks.php index 01290f0cff..8c856fdce3 100644 --- a/plugins/CoreAdminHome/Tasks.php +++ b/plugins/CoreAdminHome/Tasks.php @@ -18,6 +18,7 @@ use Piwik\Option; use Piwik\Plugins\CoreAdminHome\Tasks\ArchivesToPurgeDistributedList; use Piwik\Tracker\Visit\ReferrerSpamFilter; use Psr\Log\LoggerInterface; +use Piwik\SettingsPiwik; class Tasks extends \Piwik\Plugin\Tasks { @@ -48,7 +49,9 @@ class Tasks extends \Piwik\Plugin\Tasks // lowest priority since tables should be optimized after they are modified $this->daily('optimizeArchiveTable', null, self::LOWEST_PRIORITY); - $this->weekly('updateSpammerBlacklist'); + if(SettingsPiwik::isInternetEnabled() === true){ + $this->weekly('updateSpammerBlacklist'); + } } /** diff --git a/plugins/CoreAdminHome/templates/home.twig b/plugins/CoreAdminHome/templates/home.twig index e34b8ce349..232efd7785 100644 --- a/plugins/CoreAdminHome/templates/home.twig +++ b/plugins/CoreAdminHome/templates/home.twig @@ -36,10 +36,10 @@ {{ feedbackHelp|raw }} {% endif %} - {% if hasPremiumFeatures and isMarketplaceEnabled %} + {% if hasPremiumFeatures and isMarketplaceEnabled and isInternetEnabled %} <div piwik-widget-loader='{"module":"Marketplace","action":"getPremiumFeatures"}'></div> {% endif %} - {% if hasNewPlugins and isMarketplaceEnabled %} + {% if hasNewPlugins and isMarketplaceEnabled and isInternetEnabled %} <div piwik-widget-loader='{"module":"Marketplace","action":"getNewPlugins", "isAdminPage": "1"}'></div> {% endif %} @@ -63,7 +63,7 @@ <div piwik-widget-loader='{"module":"CoreHome","action":"getDonateForm","widget": "0"}'></div> </div> {% endif %} - {% if hasPiwikBlog %} + {% if hasPiwikBlog and isInternetEnabled %} <div class="col s12 {% if hasDonateForm %}m6{% endif %}"> <div piwik-widget-loader='{"module":"RssWidget","action":"rssPiwik"}'></div> </div> |