diff --git a/Modules/Chatroom/classes/class.ilObjChatroomAdminGUI.php b/Modules/Chatroom/classes/class.ilObjChatroomAdminGUI.php index 6858e53fca59..3f34239667f3 100644 --- a/Modules/Chatroom/classes/class.ilObjChatroomAdminGUI.php +++ b/Modules/Chatroom/classes/class.ilObjChatroomAdminGUI.php @@ -57,8 +57,11 @@ public function executeCommand(): void { $next_class = strtolower($this->ctrl->getNextClass()); + $tabFactory = new ilChatroomTabGUIFactory($this); + switch ($next_class) { case strtolower(ilPermissionGUI::class): + $tabFactory->getAdminTabsForCommand($this->ctrl->getCmd()); $this->prepareOutput(); $perm_gui = new ilPermissionGUI($this); $this->ctrl->forwardCommand($perm_gui); @@ -76,7 +79,6 @@ public function executeCommand(): void break; default: - $tabFactory = new ilChatroomTabGUIFactory($this); $tabFactory->getAdminTabsForCommand($this->ctrl->getCmd()); $res = explode('-', $this->ctrl->getCmd(), 2); if (!array_key_exists(1, $res)) { @@ -85,6 +87,11 @@ public function executeCommand(): void $this->dispatchCall($res[0], $res[1]); } + + if ($tabFactory->getActivatedTab() !== null && + $this->tabs_gui->getActiveTab() !== $tabFactory->getActivatedTab()) { + $this->tabs_gui->activateTab($tabFactory->getActivatedTab()); + } } public function getConnector(): ilChatroomServerConnector