diff options
author | Benaka Moorthi <benaka.moorthi@gmail.com> | 2013-07-17 14:18:21 +0400 |
---|---|---|
committer | Benaka Moorthi <benaka.moorthi@gmail.com> | 2013-07-17 14:18:21 +0400 |
commit | 704629b72935d20d507f73219b89013101d2c1c7 (patch) | |
tree | 69ee5b2188ddeb87e47082901350362d5da5793e /core | |
parent | 80dd44b3f918516d64c2a257480d194b1c89c291 (diff) |
Added initial UI integration tests that use cutycapt to take screenshots of URLs.
Diffstat (limited to 'core')
-rw-r--r-- | core/Access.php | 9 | ||||
-rw-r--r-- | core/Config.php | 7 | ||||
-rw-r--r-- | core/FrontController.php | 1 |
3 files changed, 16 insertions, 1 deletions
diff --git a/core/Access.php b/core/Access.php index 9045e5bcb7..33952f943e 100644 --- a/core/Access.php +++ b/core/Access.php @@ -206,13 +206,20 @@ class Piwik_Access protected function reloadAccessSuperUser() { $this->isSuperUser = true; + try { $allSitesId = Piwik_SitesManager_API::getInstance()->getAllSitesId(); } catch(Exception $e) { $allSitesId = array(); } $this->idsitesByAccess['superuser'] = $allSitesId; - $this->login = Piwik_Config::getInstance()->superuser['login']; + + if (isset($GLOBALS['PIWIK_ACCESS_SUPERUSER_LOGIN'])) { + $this->login = $GLOBALS['PIWIK_ACCESS_SUPERUSER_LOGIN']; + } else { + $this->login = Piwik_Config::getInstance()->superuser['login']; + } + return true; } diff --git a/core/Config.php b/core/Config.php index 354f9e4e37..8b71e0c256 100644 --- a/core/Config.php +++ b/core/Config.php @@ -126,6 +126,13 @@ class Piwik_Config // for unit tests, we set that no plugin is installed. This will force // the test initialization to create the plugins tables, execute ALTER queries, etc. $this->configCache['PluginsInstalled'] = array('PluginsInstalled' => array()); + + if (isset($configGlobal['Plugins'])) { + $this->configCache['Plugins'] = $this->configGlobal['Plugins']; + $this->configCache['Plugins']['Plugins'][] = 'DevicesDetection'; + } + + $this->configCache['disable_merged_assets'] = 1; } /** diff --git a/core/FrontController.php b/core/FrontController.php index 22dde1dae4..9932f6b058 100644 --- a/core/FrontController.php +++ b/core/FrontController.php @@ -244,6 +244,7 @@ class Piwik_FrontController $pluginsManager = Piwik_PluginsManager::getInstance(); $pluginsToLoad = Piwik_Config::getInstance()->Plugins['Plugins']; + $pluginsManager->loadPlugins($pluginsToLoad); if ($exceptionToThrow) { |