diff options
author | mattab <matthieu.aubry@gmail.com> | 2014-11-25 03:54:59 +0300 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2014-11-25 03:54:59 +0300 |
commit | 14e557bfb9cd2d117443d0da414a099c477b60a1 (patch) | |
tree | 650a413d6ada8ccdbadd7d8a9eb7bbb3083eaad6 /plugins/PrivacyManager/Controller.php | |
parent | a8917239df8ef46312c5295f8a92070f87125f86 (diff) |
refs #6697 start refactoring the DoNotTrack code to allow for adding tests
Diffstat (limited to 'plugins/PrivacyManager/Controller.php')
-rw-r--r-- | plugins/PrivacyManager/Controller.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/PrivacyManager/Controller.php b/plugins/PrivacyManager/Controller.php index c950d789ed..1a50d7ac63 100644 --- a/plugins/PrivacyManager/Controller.php +++ b/plugins/PrivacyManager/Controller.php @@ -133,7 +133,8 @@ class Controller extends \Piwik\Plugin\ControllerAdmin if (Piwik::hasUserSuperUserAccess()) { $view->deleteData = $this->getDeleteDataInfo(); $view->anonymizeIP = $this->getAnonymizeIPInfo(); - $view->dntSupport = DoNotTrackHeaderChecker::isActive(); + $dntChecker = new DoNotTrackHeaderChecker(); + $view->dntSupport = $dntChecker->isActive(); $view->canDeleteLogActions = Db::isLockPrivilegeGranted(); $view->dbUser = PiwikConfig::getInstance()->database['username']; $view->deactivateNonce = Nonce::getNonce(self::DEACTIVATE_DNT_NONCE); @@ -297,7 +298,8 @@ class Controller extends \Piwik\Plugin\ControllerAdmin Piwik::checkUserHasSuperUserAccess(); Nonce::checkNonce(self::DEACTIVATE_DNT_NONCE); - DoNotTrackHeaderChecker::deactivate(); + $dntChecker = new DoNotTrackHeaderChecker(); + $dntChecker->deactivate(); $this->redirectToIndex('PrivacyManager', 'privacySettings'); } @@ -307,7 +309,8 @@ class Controller extends \Piwik\Plugin\ControllerAdmin Piwik::checkUserHasSuperUserAccess(); Nonce::checkNonce(self::ACTIVATE_DNT_NONCE); - DoNotTrackHeaderChecker::activate(); + $dntChecker = new DoNotTrackHeaderChecker(); + $dntChecker->activate(); $this->redirectToIndex('PrivacyManager', 'privacySettings'); } |