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:
authorThomas Steur <tsteur@users.noreply.github.com>2020-05-14 23:09:18 +0300
committerGitHub <noreply@github.com>2020-05-14 23:09:18 +0300
commitf1e6bf21a4d2cf9b98454adada765c2f3ada1612 (patch)
tree307d2ed4055279554a8bc7ba1bcca0f008aae35b /plugins
parentdc4c4947d0f3d9e193be4191c963b55c6018d6a2 (diff)
ignore any saved value in the options table for social and search engines list when internet is disabled (#15951)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Referrers/SearchEngine.php3
-rw-r--r--plugins/Referrers/Social.php3
2 files changed, 4 insertions, 2 deletions
diff --git a/plugins/Referrers/SearchEngine.php b/plugins/Referrers/SearchEngine.php
index c2aed7910c..ee8c26a45e 100644
--- a/plugins/Referrers/SearchEngine.php
+++ b/plugins/Referrers/SearchEngine.php
@@ -12,6 +12,7 @@ use Piwik\Cache;
use Piwik\Common;
use Piwik\Option;
use Piwik\Piwik;
+use Piwik\SettingsPiwik;
use Piwik\Singleton;
use Piwik\UrlHelper;
@@ -53,7 +54,7 @@ class SearchEngine extends Singleton
// Read first from the auto-updated list in database
$list = Option::get(self::OPTION_STORAGE_NAME);
- if ($list) {
+ if ($list && SettingsPiwik::isInternetEnabled()) {
$this->definitionList = Common::safe_unserialize(base64_decode($list));
} else {
// Fallback to reading the bundled list
diff --git a/plugins/Referrers/Social.php b/plugins/Referrers/Social.php
index 7e4c7621af..8a84a95bfd 100644
--- a/plugins/Referrers/Social.php
+++ b/plugins/Referrers/Social.php
@@ -11,6 +11,7 @@ use Piwik\Cache;
use Piwik\Common;
use Piwik\Option;
use Piwik\Piwik;
+use Piwik\SettingsPiwik;
use Piwik\Singleton;
/**
@@ -51,7 +52,7 @@ class Social extends Singleton
// Read first from the auto-updated list in database
$list = Option::get(self::OPTION_STORAGE_NAME);
- if ($list) {
+ if ($list && SettingsPiwik::isInternetEnabled()) {
$this->definitionList = Common::safe_unserialize(base64_decode($list));
} else {
// Fallback to reading the bundled list