diff --git a/core/FrontController.php b/core/FrontController.php index 74348d05687decbcdd152d8b26a9e3df2b34c712..6fb08f158d3e80794a5b646cd2c499612dc5e7b4 100644 --- a/core/FrontController.php +++ b/core/FrontController.php @@ -199,7 +199,7 @@ class Piwik_FrontController protected function createAccessObject() { - Piwik::createAccessObject(); + Piwik_Access::getInstance(); } /** diff --git a/core/Piwik.php b/core/Piwik.php index a64999891abd9bbb7cfe3432f17ff108f16cfc5d..84ba32449c6eecf76bc93c85c29f46bb6aedc5a2 100644 --- a/core/Piwik.php +++ b/core/Piwik.php @@ -2007,19 +2007,6 @@ class Piwik } } - /* - * Global access object - */ - - /** - * Create access object - */ - static public function createAccessObject() - { - Piwik_Access::getInstance(); - //Zend_Registry::set('access', new Piwik_Access()); - } - /* * User input validation */ diff --git a/plugins/Installation/Controller.php b/plugins/Installation/Controller.php index ba556775bcd7468f0cb9260a6a7ccfa70f8f8fd6..443baaaa12a793e141b1d3bfe4b5a8f3ace3de41 100644 --- a/plugins/Installation/Controller.php +++ b/plugins/Installation/Controller.php @@ -262,7 +262,7 @@ class Piwik_Installation_Controller extends Piwik_Controller_Admin $baseTablesInstalled = count($tablesInstalled) - count($archiveTables); $minimumCountPiwikTables = 17; - Piwik::createAccessObject(); + Piwik_Access::getInstance(); Piwik::setUserIsSuperUser(); if ($baseTablesInstalled >= $minimumCountPiwikTables && count(Piwik_SitesManager_API::getInstance()->getAllSitesId()) > 0 && diff --git a/tests/PHPUnit/IntegrationTestCase.php b/tests/PHPUnit/IntegrationTestCase.php index 6772f84820f054912597f348758a3e9b3a7a3741..58f75dd5be6b64ee1f0916fa1ea78b47030e7477 100755 --- a/tests/PHPUnit/IntegrationTestCase.php +++ b/tests/PHPUnit/IntegrationTestCase.php @@ -150,8 +150,9 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase include "DataFiles/Currencies.php"; include "DataFiles/LanguageToCountry.php"; include "DataFiles/Providers.php"; - - Piwik::createAccessObject(); + + Piwik_Access::setSingletonInstance(null); + Piwik_Access::getInstance(); Piwik_PostEvent('FrontController.initAuthenticationObject'); // We need to be SU to create websites for tests @@ -225,8 +226,6 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase $_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'en'; $this->changeLanguage('en'); - - Piwik::$cachedKnownSegmentsToArchive = null; } protected static $apiToCall = array();