1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-22 21:40:08 +00:00

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! ;)
This commit is contained in:
Tim Düsterhus 2011-12-15 10:56:22 +01:00
parent 18d27897e4
commit c24402ec86

View File

@ -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())
)));
}