mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-10-31 14:10:08 +00:00
Added phpdoc and corrected codingstyle ;)
This commit is contained in:
parent
cbcf875fe1
commit
6652cb4c09
@ -104,7 +104,7 @@ public function readParameters() {
|
|||||||
//TODO: Initialise LogPage
|
//TODO: Initialise LogPage
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
elseif($this->action == 'Send') {
|
else if ($this->action == 'Send') {
|
||||||
//TODO: Safe message in database
|
//TODO: Safe message in database
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@ -181,7 +181,7 @@ public function show() {
|
|||||||
if ($this->useTemplate) exit;
|
if ($this->useTemplate) exit;
|
||||||
@header('Content-type: application/json');
|
@header('Content-type: application/json');
|
||||||
echo \wcf\util\JSON::encode(array(
|
echo \wcf\util\JSON::encode(array(
|
||||||
'title' => $this->room->getTitle(),
|
'title' => WCF::getLanguage()->get($this->room->title),
|
||||||
'topic' => WCF::getLanguage()->get($this->room->topic)
|
'topic' => WCF::getLanguage()->get($this->room->topic)
|
||||||
));
|
));
|
||||||
exit;
|
exit;
|
||||||
|
@ -1,14 +1,21 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace wcf\system\event\listener;
|
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()
|
* @see wcf\system\event\IEventListener::execute()
|
||||||
*/
|
*/
|
||||||
public function execute($eventObj, $className, $eventName) {
|
public function execute($eventObj, $className, $eventName) {
|
||||||
$route = new Route('chatAction');
|
$route = new \wcf\system\request\Route('chatAction');
|
||||||
$route->setSchema('/{controller}/{action}');
|
$route->setSchema('/{controller}/{action}');
|
||||||
$route->setParameterOption('controller', null, 'Chat');
|
$route->setParameterOption('controller', null, 'Chat');
|
||||||
$route->setParameterOption('action', null, '(Log|Send)');
|
$route->setParameterOption('action', null, '(Log|Send)');
|
||||||
|
Loading…
Reference in New Issue
Block a user