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:
authormattab <matthieu.aubry@gmail.com>2014-02-04 23:12:15 +0400
committermattab <matthieu.aubry@gmail.com>2014-02-04 23:12:15 +0400
commit5faa275e56fb328cfeeea2b91a80102461344b90 (patch)
tree10cac67d105f9dbd5bd60eed74e4c052a40c2a57
parentee85eb46395a1d2ae6a0972acd20482547448080 (diff)
Minor
-rw-r--r--plugins/PrivacyManager/Controller.php21
m---------tests/PHPUnit/UI0
2 files changed, 9 insertions, 12 deletions
diff --git a/plugins/PrivacyManager/Controller.php b/plugins/PrivacyManager/Controller.php
index 0ea3dffefd..d7746bef3a 100644
--- a/plugins/PrivacyManager/Controller.php
+++ b/plugins/PrivacyManager/Controller.php
@@ -38,7 +38,15 @@ class Controller extends \Piwik\Plugin\ControllerAdmin
$this->checkTokenInUrl();
switch (Common::getRequestVar('form')) {
case("formMaskLength"):
- $this->handlePluginState(Common::getRequestVar("anonymizeIPEnable", 0));
+ $enable = Common::getRequestVar("anonymizeIPEnable", 0);
+ if ($enable == 1) {
+ IPAnonymizer::activate();
+ } else if ($enable == 0) {
+ IPAnonymizer::deactivate();
+ } else {
+ // pass
+ }
+
$privacyConfig = new Config();
$privacyConfig->ipAddressMaskLength = Common::getRequestVar("maskLength", 1);
$privacyConfig->useAnonymizedIpForVisitEnrichment = Common::getRequestVar("useAnonymizedIpForVisitEnrichment", 1);
@@ -283,17 +291,6 @@ class Controller extends \Piwik\Plugin\ControllerAdmin
return $deleteDataInfos;
}
- protected function handlePluginState($state = 0)
- {
- if ($state == 1) {
- IPAnonymizer::activate();
- } else if ($state == 0) {
- IPAnonymizer::deactivate();
- } else {
- // pass
- }
- }
-
public function deactivateDoNotTrack()
{
Piwik::checkUserHasSuperUserAccess();
diff --git a/tests/PHPUnit/UI b/tests/PHPUnit/UI
-Subproject 254e2d4ff48e44bcb15a28767fb77b741aa8d2e
+Subproject 1e7ebe4b7b765c1b235bffe9f72b088957fc64b