mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2025-01-10 00:30:09 +00:00
Adding ChatLeaveAction to Routing
This commit is contained in:
parent
856587648a
commit
a7e6bab0cd
@ -105,25 +105,24 @@ public function readDefaultSmileys() {
|
|||||||
public function readParameters() {
|
public function readParameters() {
|
||||||
parent::readParameters();
|
parent::readParameters();
|
||||||
|
|
||||||
if ($this->action == 'Message') {
|
switch ($this->action) {
|
||||||
new ChatMessagePage();
|
case 'Message':
|
||||||
exit;
|
new ChatMessagePage();
|
||||||
}
|
exit;
|
||||||
else if ($this->action == 'Log') {
|
case 'Log':
|
||||||
//TODO: Initialise LogPage
|
exit;
|
||||||
exit;
|
case 'RefreshRoomList':
|
||||||
}
|
new ChatRefreshRoomListPage();
|
||||||
else if ($this->action == 'RefreshRoomList') {
|
exit;
|
||||||
new ChatRefreshRoomListPage();
|
case 'Send':
|
||||||
exit;
|
new \wcf\form\ChatForm();
|
||||||
}
|
exit;
|
||||||
else if ($this->action == 'Send') {
|
case 'Leave':
|
||||||
new \wcf\form\ChatForm();
|
new \wcf\action\ChatLeaveAction();
|
||||||
exit;
|
exit;
|
||||||
}
|
case 'Copyright':
|
||||||
else if ($this->action == 'Copyright') {
|
new ChatCopyrightPage();
|
||||||
new ChatCopyrightPage();
|
exit;
|
||||||
exit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_REQUEST['id'])) $this->roomID = (int) $_REQUEST['id'];
|
if (isset($_REQUEST['id'])) $this->roomID = (int) $_REQUEST['id'];
|
||||||
|
@ -18,7 +18,7 @@ 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}');
|
||||||
$route->setParameterOption('controller', null, 'Chat');
|
$route->setParameterOption('controller', null, 'Chat');
|
||||||
$route->setParameterOption('action', null, '(Message|Log|Send|RefreshRoomList|Copyright)');
|
$route->setParameterOption('action', null, '(Message|Log|Send|RefreshRoomList|Copyright|Leave)');
|
||||||
$eventObj->addRoute($route);
|
$eventObj->addRoute($route);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user