1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2025-01-09 00:20:08 +00:00

Support {id} in chat routes

This commit is contained in:
Tim Düsterhus 2012-11-23 20:31:40 +01:00
parent 912201dd64
commit bd051d2426

View File

@ -16,9 +16,10 @@ class ChatRouteListener implements \wcf\system\event\IEventListener {
*/ */
public function execute($eventObj, $className, $eventName) { public function execute($eventObj, $className, $eventName) {
$route = new \wcf\system\request\Route('chatAction'); $route = new \wcf\system\request\Route('chatAction');
$route->setSchema('/{controller}/{action}'); $route->setSchema('/{controller}/{action}/{id}');
$route->setParameterOption('controller', null, 'Chat'); $route->setParameterOption('controller', null, 'Chat');
$route->setParameterOption('action', null, '(Message|Log|Send|RefreshRoomList|Copyright|Leave)'); $route->setParameterOption('action', null, '(Message|Log|Send|RefreshRoomList|Copyright|Leave)');
$route->setParameterOption('id', null, '\d+', true);
$eventObj->addRoute($route); $eventObj->addRoute($route);
} }
} }