diff options
author | Julien Moumné <julien@moumne.com> | 2014-04-27 22:41:39 +0400 |
---|---|---|
committer | Julien Moumné <julien@moumne.com> | 2014-04-27 22:41:39 +0400 |
commit | 77cd310f7164196bb843e23011508b15a2c8f371 (patch) | |
tree | 95e7f5df21c72e21a43a2e000ef0aa8fae4dd8a8 /plugins/SitesManager/Controller.php | |
parent | d2bda6f6072064b198408c6b1f5110d9ec56d12a (diff) |
code simplification : API::getInstance()->getSitesWithAdminAccess() returns all sites if user has super user access
Diffstat (limited to 'plugins/SitesManager/Controller.php')
-rw-r--r-- | plugins/SitesManager/Controller.php | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/SitesManager/Controller.php b/plugins/SitesManager/Controller.php index 585829c065..68ed3bca71 100644 --- a/plugins/SitesManager/Controller.php +++ b/plugins/SitesManager/Controller.php @@ -35,11 +35,8 @@ class Controller extends \Piwik\Plugin\ControllerAdmin $view = new View('@SitesManager/index'); Site::clearCache(); - if (Piwik::hasUserSuperUserAccess()) { - $sitesRaw = API::getInstance()->getAllSites(); - } else { - $sitesRaw = API::getInstance()->getSitesWithAdminAccess(); - } + $sitesRaw = API::getInstance()->getSitesWithAdminAccess(); + // Gets sites after Site.setSite hook was called $sites = array_values( Site::getSites() ); if(count($sites) != count($sitesRaw)) { |