diff options
Diffstat (limited to 'core/Updates/2.9.0-b1.php')
-rw-r--r-- | core/Updates/2.9.0-b1.php | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/core/Updates/2.9.0-b1.php b/core/Updates/2.9.0-b1.php index 8a0a096241..f36f52a6bd 100644 --- a/core/Updates/2.9.0-b1.php +++ b/core/Updates/2.9.0-b1.php @@ -10,6 +10,7 @@ namespace Piwik\Updates; use Piwik\Common; use Piwik\Db; +use Piwik\Option; use Piwik\Plugin\Manager; use Piwik\Updater; use Piwik\Updates; @@ -22,7 +23,6 @@ class Updates_2_9_0_b1 extends Updates $sql = self::updateBrowserEngine($sql); - return $sql; } @@ -30,6 +30,8 @@ class Updates_2_9_0_b1 extends Updates { Updater::updateDatabase(__FILE__, self::getSql()); + self::updateIPAnonymizationSettings(); + try { Manager::getInstance()->activatePlugin('TestRunner'); } catch (\Exception $e) { @@ -72,4 +74,19 @@ class Updates_2_9_0_b1 extends Updates return $sql; } + + private static function updateIPAnonymizationSettings() + { + $optionName = 'PrivacyManager.ipAnonymizerEnabled'; + + $value = Option::get($optionName); + + if ($value !== false) { + // If the config is defined, nothing to do + return; + } + + // We disable IP anonymization if it wasn't configured (because by default it has gone from disabled to enabled) + Option::set($optionName, '0'); + } } |