mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-10-31 14:10:08 +00:00
Sending 204 No Content in ChatForm
This commit is contained in:
parent
3c442c2371
commit
3243f82f07
@ -1,7 +1,6 @@
|
||||
<?php
|
||||
namespace wcf\form;
|
||||
use \wcf\data\chat;
|
||||
use \wcf\system\exception\PermissionDeniedException;
|
||||
use \wcf\system\exception\UserInputException;
|
||||
use \wcf\system\WCF;
|
||||
use \wcf\util\StringUtil;
|
||||
@ -23,7 +22,7 @@ class ChatForm extends AbstractForm {
|
||||
public $useTemplate = false;
|
||||
|
||||
/**
|
||||
* @see \wcf\page\AbstractPage::readData()
|
||||
* @see \wcf\page\IPage::readData()
|
||||
*/
|
||||
public function readData() {
|
||||
$this->userData['color'] = \wcf\util\ChatUtil::readUserData('color');
|
||||
@ -37,7 +36,7 @@ public function readData() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see \wcf\form\AbstractForm::readFormParameters()
|
||||
* @see \wcf\form\IForm::readFormParameters()
|
||||
*/
|
||||
public function readFormParameters() {
|
||||
parent::readFormParameters();
|
||||
@ -47,7 +46,7 @@ public function readFormParameters() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see \wcf\form\AbstractForm::validate()
|
||||
* @see \wcf\form\IForm::validate()
|
||||
*/
|
||||
public function validate() {
|
||||
parent::validate();
|
||||
@ -57,13 +56,12 @@ public function validate() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see \wcf\form\AbstractForm::save()
|
||||
* @see \wcf\form\IForm::save()
|
||||
*/
|
||||
public function save() {
|
||||
parent::save();
|
||||
|
||||
$commandHandler = new \wcf\system\chat\commands\ChatCommandHandler();
|
||||
var_dump($commandHandler->isCommand($this->message));
|
||||
$messageAction = new chat\message\ChatMessageAction(array(), 'create', array(
|
||||
'data' => array(
|
||||
'roomID' => $this->room->roomID,
|
||||
@ -81,4 +79,12 @@ public function save() {
|
||||
|
||||
$this->saved();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see \wcf\page\IPage::show()
|
||||
*/
|
||||
public function show() {
|
||||
header("HTTP/1.0 204 No Content");
|
||||
parent::show();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user