From c24402ec86af411b5a49d2fb24cdc19634cdf63c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 15 Dec 2011 10:56:22 +0100 Subject: [PATCH] Fix getLink Call isVisible again directly before getLink to ensure the pointer is at the first place. ... and we also have to return the new link! ;) --- file/lib/system/menu/page/ChatPageMenuItemProvider.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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()) ))); }