diff options
author | Stefan Giehl <stefan@piwik.org> | 2018-10-03 22:52:29 +0300 |
---|---|---|
committer | diosmosis <diosmosis@users.noreply.github.com> | 2018-10-03 22:52:29 +0300 |
commit | 902bd940c87fd9f0d1730dc2b9560b862b8c8e9a (patch) | |
tree | ea03fcb6f0a79f8e6f06b2814651d55b91f306ea /plugins/CustomVariables | |
parent | 67eaa2c0381933d5e38180a2159044893447acca (diff) |
Improve usage of requested site in plugin Controllers (#13526)
Diffstat (limited to 'plugins/CustomVariables')
-rw-r--r-- | plugins/CustomVariables/Controller.php | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/plugins/CustomVariables/Controller.php b/plugins/CustomVariables/Controller.php index 432fb582d2..d9b8a76ef1 100644 --- a/plugins/CustomVariables/Controller.php +++ b/plugins/CustomVariables/Controller.php @@ -17,12 +17,8 @@ class Controller extends \Piwik\Plugin\Controller { public function manage() { - $idSite = Common::getRequestVar('idSite', null, 'int'); - - // check the site exists - $site = new Site($idSite); - - Piwik::checkUserHasAdminAccess($idSite); + $this->checkSitePermission(); + Piwik::checkUserHasAdminAccess($this->idSite); return $this->renderTemplate('manage', array()); } |