diff --git a/Services/Dashboard/classes/class.ilDashboardGUI.php b/Services/Dashboard/classes/class.ilDashboardGUI.php index 9892f4746c1f..bcdd67e08706 100755 --- a/Services/Dashboard/classes/class.ilDashboardGUI.php +++ b/Services/Dashboard/classes/class.ilDashboardGUI.php @@ -67,8 +67,8 @@ public function __construct() $this->ctrl = $DIC->ctrl(); if ($this->user->getId() === ANONYMOUS_USER_ID) { - $DIC->ui()->mainTemplate()->setOnScreenMessage('failure', $this->lng->txt('msg_not_available_for_anon'), true); - $DIC->ctrl()->redirectToURL('login.php?cmd=force_login'); + $tpl->setOnScreenMessage('failure', $this->lng->txt('msg_not_available_for_anon'), true); + $this->ctrl->redirectToURL('login.php?cmd=force_login'); } $this->tpl = $tpl; @@ -344,7 +344,7 @@ public function setTabs(): void public function jumpToMemberships(): void { - $viewSettings = new ilPDSelectedItemsBlockViewSettings($GLOBALS['DIC']->user(), $this->requested_view); + $viewSettings = new ilPDSelectedItemsBlockViewSettings($this->user, $this->requested_view); if ($viewSettings->enabledMemberships()) { $this->ctrl->setParameter($this, 'view', $viewSettings->getMembershipsView()); } @@ -353,7 +353,7 @@ public function jumpToMemberships(): void public function jumpToSelectedItems(): void { - $viewSettings = new ilPDSelectedItemsBlockViewSettings($GLOBALS['DIC']->user(), $this->requested_view); + $viewSettings = new ilPDSelectedItemsBlockViewSettings($this->user, $this->requested_view); if ($viewSettings->enabledSelectedItems()) { $this->ctrl->setParameter($this, 'view', $viewSettings->getSelectedItemsView()); } @@ -473,7 +473,6 @@ protected function getMainContent(): string } } - $tpl->setVariable('CONTENT', $html); return $tpl->get();