diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2020-05-14 23:09:18 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-14 23:09:18 +0300 |
commit | f1e6bf21a4d2cf9b98454adada765c2f3ada1612 (patch) | |
tree | 307d2ed4055279554a8bc7ba1bcca0f008aae35b | |
parent | dc4c4947d0f3d9e193be4191c963b55c6018d6a2 (diff) |
ignore any saved value in the options table for social and search engines list when internet is disabled (#15951)
-rw-r--r-- | plugins/Referrers/SearchEngine.php | 3 | ||||
-rw-r--r-- | plugins/Referrers/Social.php | 3 |
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 |