diff options
author | diosmosis <benakamoorthi@fastmail.fm> | 2014-02-09 11:13:50 +0400 |
---|---|---|
committer | diosmosis <benakamoorthi@fastmail.fm> | 2014-02-09 11:14:12 +0400 |
commit | a1f469175f50e755115036df56420f46abf16f75 (patch) | |
tree | 520f69a5842d04f23d2e053218c8f9a9b9e55ff3 /core/View.php | |
parent | a5717f94e18e5fea4ace419320710c95381c7e96 (diff) |
Create dashboard settings base control and use with new dashboard manager control, fix regression in dashboard menu handling (menu would not rebuild on dashboard rename/remove/create), remove use of id attribute in _dashboardSettings.twig, fix z-index regression in dashboard settings popup in morpheus.
Diffstat (limited to 'core/View.php')
-rw-r--r-- | core/View.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/core/View.php b/core/View.php index 3b5dd03985..c3f45c65c1 100644 --- a/core/View.php +++ b/core/View.php @@ -135,6 +135,8 @@ class View implements ViewInterface $this->piwik_version = Version::VERSION; $this->piwikUrl = Common::sanitizeInputValue(Url::getCurrentUrlWithoutFileName()); + $this->userLogin = Piwik::getCurrentUserLogin(); + $this->isSuperUser = Access::getInstance()->hasSuperUserAccess(); // TODO: redundancy w/ userIsSuperUser } /** @@ -200,9 +202,6 @@ class View implements ViewInterface try { $this->currentModule = Piwik::getModule(); $this->currentAction = Piwik::getAction(); - $userLogin = Piwik::getCurrentUserLogin(); - $this->userLogin = $userLogin; - $this->isSuperUser = Access::getInstance()->hasSuperUserAccess(); $count = SettingsPiwik::getWebsitesCountToDisplay(); @@ -226,7 +225,7 @@ class View implements ViewInterface $this->loginModule = Piwik::getLoginPluginName(); - $user = APIUsersManager::getInstance()->getUser($userLogin); + $user = APIUsersManager::getInstance()->getUser($this->userLogin); $this->userAlias = $user['alias']; } catch (Exception $e) { // can fail, for example at installation (no plugin loaded yet) |