diff --git a/file/lib/system/menu/page/ChatPageMenuItemProvider.class.php b/file/lib/system/menu/page/ChatPageMenuItemProvider.class.php index bdfebdd..93d0c37 100644 --- a/file/lib/system/menu/page/ChatPageMenuItemProvider.class.php +++ b/file/lib/system/menu/page/ChatPageMenuItemProvider.class.php @@ -38,7 +38,8 @@ public function isVisible() { * @see \wcf\system\menu\page\PageMenuItemProvider::getLink() */ public function getLink() { - \wcf\util\HeaderUtil::redirect(\wcf\system\request\LinkHandler::getInstance()->getLink('Chat', array( + if (!$this->isVisible()) return parent::getLink(); + return \wcf\util\HeaderUtil::redirect(\wcf\system\request\LinkHandler::getInstance()->getLink('Chat', array( 'object' => ChatRoom::getCache()->search(ChatRoom::getCache()->key()) ))); }