1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-22 21:40:08 +00:00
This commit is contained in:
Tim Düsterhus 2012-11-17 14:45:51 +01:00
parent 1e82dfc389
commit 3863a46e49
4 changed files with 21 additions and 13 deletions

View File

@ -65,7 +65,7 @@ public function getFormattedMessage($outputType = 'text/html') {
$message = WCF::getLanguage()->getDynamicVariable('wcf.chat.message.'.$this->type.'.'.$message['type']);
break;
case self::TYPE_WHISPER:
$message = @unserialize($message);
$message = $message['message'];
case self::TYPE_NORMAL:
case self::TYPE_ME:

View File

@ -62,7 +62,7 @@ public static function getSuspensionByUserRoomAndType(\wcf\data\user\User $user,
$sql = "SELECT
*
FROM
wcf".WCF_N."_user_group_application
wcf".WCF_N."_chat_suspension
WHERE
userID = ?
AND roomID = ?

View File

@ -87,6 +87,13 @@ class ChatPage extends AbstractPage {
*/
public $userData = array();
/**
* The request that is actually handled.
*
* @var mixed
*/
public $request = null;
/**
* @see \wcf\page\IPage::assignVariables()
*/
@ -178,28 +185,29 @@ public function readData() {
public function readParameters() {
parent::readParameters();
$this->request = $this;
switch ($this->action) {
case 'Message':
$page = new ChatMessagePage();
$page->__run();
$this->request = new ChatMessagePage();
$this->request->__run();
exit;
case 'Log':
exit;
case 'RefreshRoomList':
$page = new ChatRefreshRoomListPage();
$page->__run();
$this->request = new ChatRefreshRoomListPage();
$this->request->__run();
exit;
case 'Send':
$form = new \wcf\form\ChatForm();
$form->__run();
$this->request = new \wcf\form\ChatForm();
$this->request->__run();
exit;
case 'Leave':
$action = new \wcf\action\ChatLeaveAction();
$action->__run();
$this->request = new \wcf\action\ChatLeaveAction();
$this->request->__run();
exit;
case 'Copyright':
$page = new ChatCopyrightPage();
$page->__run();
$this->request = new ChatCopyrightPage();
$this->request->__run();
exit;
}

View File

@ -106,7 +106,7 @@ Hinweis: Setzen Sie diese Einstellung nur, wenn Sie wissen, was sie bewirkt. Die
<item name="wcf.chat.message.3"><![CDATA[ist jetzt abwesend{if $message}: {$message}{else}.{/if}]]></item>
<!-- 4 = TYPE_BACK -->
<item name="wcf.chat.message.4"><![CDATA[ist jetzt wieder da.]]></item>
<!-- 4 = TYPE_MODERATE -->
<!-- 5 = TYPE_MODERATE -->
<item name="wcf.chat.message.5.restore"><![CDATA[hat {@$link} zurückgesetzt.]]></item>
<item name="wcf.chat.message.5.mute"><![CDATA[hat {@$link} bis {@$until|time} geknebelt.]]></item>