From 18d27897e495594c93e957e2cbe65928a9d83be5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 15 Dec 2011 10:54:18 +0100 Subject: [PATCH] Implemented getLink for ChatPageMenuItemProvider --- .../page/ChatPageMenuItemProvider.class.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/file/lib/system/menu/page/ChatPageMenuItemProvider.class.php b/file/lib/system/menu/page/ChatPageMenuItemProvider.class.php index 8954a1e..bdfebdd 100644 --- a/file/lib/system/menu/page/ChatPageMenuItemProvider.class.php +++ b/file/lib/system/menu/page/ChatPageMenuItemProvider.class.php @@ -1,5 +1,6 @@ userID) return false; try { - \wcf\data\chat\room\ChatRoom::getCache()->seek(0); + ChatRoom::getCache()->seek(0); return true; } catch (\OutOfBoundsException $e) { return false; } } + + /** + * Modifies the link to show the Link we would be redirect to. + * + * @see \wcf\system\menu\page\PageMenuItemProvider::getLink() + */ + public function getLink() { + \wcf\util\HeaderUtil::redirect(\wcf\system\request\LinkHandler::getInstance()->getLink('Chat', array( + 'object' => ChatRoom::getCache()->search(ChatRoom::getCache()->key()) + ))); + } }