diff options
author | diosmosis <benaka@piwik.pro> | 2014-09-30 07:23:56 +0400 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2014-09-30 16:38:08 +0400 |
commit | ad33628220ca6cadad46ebb69e88a8005a5b0394 (patch) | |
tree | 0ca1248c71f67c9ab89045b88015c9dc7108d5d9 /plugins/Installation/Controller.php | |
parent | 8e82428416bd17832b5f059ae8b6933f301c4719 (diff) |
Fixing UI tests and adding tests for Access::doAsSuperUser.
Diffstat (limited to 'plugins/Installation/Controller.php')
-rw-r--r-- | plugins/Installation/Controller.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/Installation/Controller.php b/plugins/Installation/Controller.php index 7d66116082..a26a29d182 100644 --- a/plugins/Installation/Controller.php +++ b/plugins/Installation/Controller.php @@ -306,9 +306,11 @@ class Controller extends \Piwik\Plugin\ControllerAdmin { $this->checkPiwikIsNotInstalled(); - $this->initObjectsToCallAPI(); + $siteIdsCount = Access::doAsSuperUser(function () { + return count(APISitesManager::getInstance()->getAllSitesId()); + }); - if (count(APISitesManager::getInstance()->getAllSitesId()) > 0) { + if ($siteIdsCount > 0) { // if there is a already a website, skip this step and trackingCode step $this->redirectToNextStep('trackingCode'); } |