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']); $message = WCF::getLanguage()->getDynamicVariable('wcf.chat.message.'.$this->type.'.'.$message['type']);
break; break;
case self::TYPE_WHISPER: case self::TYPE_WHISPER:
$message = @unserialize($message);
$message = $message['message']; $message = $message['message'];
case self::TYPE_NORMAL: case self::TYPE_NORMAL:
case self::TYPE_ME: case self::TYPE_ME:

View File

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

View File

@ -87,6 +87,13 @@ class ChatPage extends AbstractPage {
*/ */
public $userData = array(); public $userData = array();
/**
* The request that is actually handled.
*
* @var mixed
*/
public $request = null;
/** /**
* @see \wcf\page\IPage::assignVariables() * @see \wcf\page\IPage::assignVariables()
*/ */
@ -178,28 +185,29 @@ public function readData() {
public function readParameters() { public function readParameters() {
parent::readParameters(); parent::readParameters();
$this->request = $this;
switch ($this->action) { switch ($this->action) {
case 'Message': case 'Message':
$page = new ChatMessagePage(); $this->request = new ChatMessagePage();
$page->__run(); $this->request->__run();
exit; exit;
case 'Log': case 'Log':
exit; exit;
case 'RefreshRoomList': case 'RefreshRoomList':
$page = new ChatRefreshRoomListPage(); $this->request = new ChatRefreshRoomListPage();
$page->__run(); $this->request->__run();
exit; exit;
case 'Send': case 'Send':
$form = new \wcf\form\ChatForm(); $this->request = new \wcf\form\ChatForm();
$form->__run(); $this->request->__run();
exit; exit;
case 'Leave': case 'Leave':
$action = new \wcf\action\ChatLeaveAction(); $this->request = new \wcf\action\ChatLeaveAction();
$action->__run(); $this->request->__run();
exit; exit;
case 'Copyright': case 'Copyright':
$page = new ChatCopyrightPage(); $this->request = new ChatCopyrightPage();
$page->__run(); $this->request->__run();
exit; 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> <item name="wcf.chat.message.3"><![CDATA[ist jetzt abwesend{if $message}: {$message}{else}.{/if}]]></item>
<!-- 4 = TYPE_BACK --> <!-- 4 = TYPE_BACK -->
<item name="wcf.chat.message.4"><![CDATA[ist jetzt wieder da.]]></item> <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.restore"><![CDATA[hat {@$link} zurückgesetzt.]]></item>
<item name="wcf.chat.message.5.mute"><![CDATA[hat {@$link} bis {@$until|time} geknebelt.]]></item> <item name="wcf.chat.message.5.mute"><![CDATA[hat {@$link} bis {@$until|time} geknebelt.]]></item>