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:
authorMartin Keckeis <martin.keckeis1@gmail.com>2017-06-19 14:39:29 +0300
committerStefan Giehl <stefan@piwik.org>2017-06-19 14:39:29 +0300
commit22b48527b826434ab0fb500160aa4ce17ebfd34a (patch)
tree8d289917ad81968f5502a4655afa19e5f4dbefcf /core/SettingsPiwik.php
parent14047e5c6475636ddf0691675b2deaab5ae285ba (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 'core/SettingsPiwik.php')
-rw-r--r--core/SettingsPiwik.php18
1 files changed, 17 insertions, 1 deletions
diff --git a/core/SettingsPiwik.php b/core/SettingsPiwik.php
index f8f5d37c68..590ec0ba91 100644
--- a/core/SettingsPiwik.php
+++ b/core/SettingsPiwik.php
@@ -235,6 +235,17 @@ class SettingsPiwik
}
/**
+ * Check if outgoing internet connections are enabled
+ * This is often disable in an intranet enviroment
+ *
+ * @return bool
+ */
+ public static function isInternetEnabled()
+ {
+ return (bool) Config::getInstance()->General['enable_internet_features'];
+ }
+
+ /**
* Detect whether user has enabled auto updates. Please note this config is a bit misleading. It is currently
* actually used for 2 things: To disable making any connections back to Piwik, and to actually disable the auto
* update of core and plugins.
@@ -242,7 +253,12 @@ class SettingsPiwik
*/
public static function isAutoUpdateEnabled()
{
- return (bool) Config::getInstance()->General['enable_auto_update'];
+ $enableAutoUpdate = (bool) Config::getInstance()->General['enable_auto_update'];
+ if(self::isInternetEnabled() === true && $enableAutoUpdate === true){
+ return true;
+ }
+
+ return false;
}
/**