From bd051d2426d0f74f99f51246dfb1611341682fe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 23 Nov 2012 20:31:40 +0100 Subject: [PATCH] Support {id} in chat routes --- file/lib/system/event/listener/ChatRouteListener.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/file/lib/system/event/listener/ChatRouteListener.class.php b/file/lib/system/event/listener/ChatRouteListener.class.php index 4f5f30b..0da8e8c 100644 --- a/file/lib/system/event/listener/ChatRouteListener.class.php +++ b/file/lib/system/event/listener/ChatRouteListener.class.php @@ -16,9 +16,10 @@ class ChatRouteListener implements \wcf\system\event\IEventListener { */ public function execute($eventObj, $className, $eventName) { $route = new \wcf\system\request\Route('chatAction'); - $route->setSchema('/{controller}/{action}'); + $route->setSchema('/{controller}/{action}/{id}'); $route->setParameterOption('controller', null, 'Chat'); $route->setParameterOption('action', null, '(Message|Log|Send|RefreshRoomList|Copyright|Leave)'); + $route->setParameterOption('id', null, '\d+', true); $eventObj->addRoute($route); } }