1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-10-31 14:10:08 +00:00

Merge branch 'master' into chatTemplate

This commit is contained in:
Tim Düsterhus 2011-12-11 13:41:09 +01:00
commit 9e08160a18
2 changed files with 13 additions and 6 deletions

View File

@ -106,7 +106,7 @@ public function readParameters() {
//TODO: Initialise LogPage
exit;
}
elseif($this->action == 'Send') {
else if ($this->action == 'Send') {
//TODO: Safe message in database
exit;
}

View File

@ -1,17 +1,24 @@
<?php
namespace wcf\system\event\listener;
use wcf\system\event\IEventListener;
use wcf\system\request\Route;
class ChatRouteListener implements IEventListener {
/**
* Adds a new route to RouteHandler
*
* @author Maximilian Mader
* @copyright 2010-2011 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>
* @package timwolla.wcf.chat
* @subpackage system.event.listner
*/
class ChatRouteListener implements \wcf\system\event\IEventListener {
/**
* @see wcf\system\event\IEventListener::execute()
*/
public function execute($eventObj, $className, $eventName) {
$route = new Route('chatAction');
$route = new \wcf\system\request\Route('chatAction');
$route->setSchema('/{controller}/{action}');
$route->setParameterOption('controller', null, 'Chat');
$route->setParameterOption('action', null, '(Log|Send)');
$eventObj->addRoute($route);
}
}
}