diff --git a/core/Plugin/Manager.php b/core/Plugin/Manager.php index dec992109306d79c79ac7430fe2a14dd6b05ec6a..87eeaa0e4bad9d1072a41b0215a6d5cdced0a009 100644 --- a/core/Plugin/Manager.php +++ b/core/Plugin/Manager.php @@ -65,7 +65,6 @@ class Manager extends Singleton ); protected $corePluginsDisabledByDefault = array( - 'AnonymizeIP', 'DBStats', 'DevicesDetection', 'ExampleCommand', diff --git a/core/Tracker.php b/core/Tracker.php index 7c94b535a8f49d4cbdc6aaa163e8793a51948e3c..aaaa3cd56761d28d89c43f75c3995b93cf3016b8 100644 --- a/core/Tracker.php +++ b/core/Tracker.php @@ -755,9 +755,8 @@ class Tracker if (Common::getRequestVar('forceIpAnonymization', false, null, $args) == 1) { self::updateTrackerConfig('ip_address_mask_length', 2); - $section = Config::getInstance()->Plugins_Tracker; - $section['Plugins_Tracker'][] = "AnonymizeIP"; - Config::getInstance()->Plugins_Tracker = $section; + self::connectDatabaseIfNotConnected(); + \Piwik\Plugins\PrivacyManager\IPAnonymizer::activate(); $forceIpAnonymization = true; } @@ -780,9 +779,6 @@ class Tracker self::setForceVisitorId($customVisitorId); } $pluginsDisabled = array('Provider'); - if (!$forceIpAnonymization) { - $pluginsDisabled[] = 'AnonymizeIP'; - } // Disable provider plugin, because it is so slow to do many reverse ip lookups self::setPluginsNotToLoad($pluginsDisabled); diff --git a/core/Tracker/Visit.php b/core/Tracker/Visit.php index 0277bfd632e5cd581de41b117a94643bbb3b7ac0..9862a61bce181810bee79ebceea675696c9e80eb 100644 --- a/core/Tracker/Visit.php +++ b/core/Tracker/Visit.php @@ -94,7 +94,7 @@ class Visit implements VisitInterface * Triggered after visits are tested for exclusion so plugins can modify the IP address * persisted with a visit. * - * This event is primarily used by the **AnonymizeIP** plugin to anonymize IP addresses. + * This event is primarily used by the **PrivacyManager** plugin to anonymize IP addresses. * * @param string &$ip The visitor's IP address. */ diff --git a/plugins/CustomAlerts b/plugins/CustomAlerts index 78ae6de0ad1c3a638f70f9aedf52b362fed4b6e9..cc7e2a2e6473b3f7efdc75d67fde88957a4124b4 160000 --- a/plugins/CustomAlerts +++ b/plugins/CustomAlerts @@ -1 +1 @@ -Subproject commit 78ae6de0ad1c3a638f70f9aedf52b362fed4b6e9 +Subproject commit cc7e2a2e6473b3f7efdc75d67fde88957a4124b4 diff --git a/plugins/VisitorGenerator b/plugins/VisitorGenerator index 700c71b483a661da6a5fef7f49070de85631a576..f01efa321b1add9e25e1fa84ec79048913831aa3 160000 --- a/plugins/VisitorGenerator +++ b/plugins/VisitorGenerator @@ -1 +1 @@ -Subproject commit 700c71b483a661da6a5fef7f49070de85631a576 +Subproject commit f01efa321b1add9e25e1fa84ec79048913831aa3 diff --git a/tests/PHPUnit/Core/ReleaseCheckListTest.php b/tests/PHPUnit/Core/ReleaseCheckListTest.php index a241122c5db3884ca882648ce64e4c344c1178e6..86166fa1e16ad90bfe53afae116a545b7431f98e 100644 --- a/tests/PHPUnit/Core/ReleaseCheckListTest.php +++ b/tests/PHPUnit/Core/ReleaseCheckListTest.php @@ -122,7 +122,6 @@ class ReleaseCheckListTest extends PHPUnit_Framework_TestCase public function testCheckThatGivenPluginsAreDisabledByDefault() { $pluginsShouldBeDisabled = array( - 'AnonymizeIP', 'DBStats' ); foreach ($pluginsShouldBeDisabled as $pluginName) { diff --git a/tests/PHPUnit/IntegrationTestCase.php b/tests/PHPUnit/IntegrationTestCase.php index 0db978d8493c2a8b74740529e010d4799b741ab6..82f1172558fc5dc591f24e350d32c05c1513d295 100755 --- a/tests/PHPUnit/IntegrationTestCase.php +++ b/tests/PHPUnit/IntegrationTestCase.php @@ -204,6 +204,9 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase \Piwik\SettingsPiwik::$cachedKnownSegmentsToArchive = null; \Piwik\CacheFile::$invalidateOpCacheBeforeRead = true; + + \Piwik\Plugins\PrivacyManager\IPAnonymizer::deactivate(); + \Piwik\Plugins\PrivacyManager\DoNotTrackHeaderChecker::deactivate(); } public static function tearDownAfterClass()