diff --git a/acptemplate/roomAdd.tpl b/acptemplate/roomAdd.tpl index e52d300..0946c98 100644 --- a/acptemplate/roomAdd.tpl +++ b/acptemplate/roomAdd.tpl @@ -11,9 +11,7 @@

{lang}chat.acp.room.{$action}{/lang}

-{if $errorField} -

{lang}wcf.global.form.error{/lang}

-{/if} +{include file='formError'} {if $success|isset}

{lang}wcf.global.success.{$action}{/lang}

@@ -82,6 +80,7 @@
+ {@SECURITY_TOKEN_INPUT_TAG}
diff --git a/file/acp/be.bastelstu.chat.install.php b/file/acp/be.bastelstu.chat.install.php index 194e4e9..1874d45 100644 --- a/file/acp/be.bastelstu.chat.install.php +++ b/file/acp/be.bastelstu.chat.install.php @@ -18,8 +18,16 @@ final class Install { */ private $styles = null; + /** + * Do we need to update the page title? + * + * @var boolean + */ + private $updateTitle = false; + public function __construct() { $this->styles = \wcf\system\style\StyleHandler::getInstance()->getAvailableStyles(); + if (!defined('PAGE_TITLE') || !PAGE_TITLE) $this->updateTitle = true; } /** @@ -29,6 +37,23 @@ public function execute() { foreach ($this->styles as $style) { \wcf\system\style\StyleHandler::getInstance()->resetStylesheet($style); } + + if ($this->updateTitle) { + $sql = "UPDATE + wcf".WCF_N."_option + SET + optionValue = ? + WHERE + optionName = ?"; + $stmt = \wcf\system\WCF::getDB()->prepareStatement($sql); + $stmt->execute(array('Tims Chat 3', 'page_title')); + \wcf\data\option\OptionEditor::resetCache(); + } + + \wcf\system\dashboard\DashboardHandler::setDefaultValues('com.woltlab.wcf.user.DashboardPage', array( + // content + 'be.bastelstu.chat.onlineList' => 1 + )); } } $install = new Install(); diff --git a/file/lib/system/command/commands/WhisperCommand.class.php b/file/lib/system/command/commands/WhisperCommand.class.php index 38faa18..4226211 100644 --- a/file/lib/system/command/commands/WhisperCommand.class.php +++ b/file/lib/system/command/commands/WhisperCommand.class.php @@ -1,6 +1,6 @@ user = User::getUserByUsername($username); + $this->user = UserProfile::getUserProfileByUsername($username); if (!$this->user->userID) throw new \chat\system\command\UserNotFoundException($username); + if (!\wcf\system\WCF::getSession()->getPermission('user.profile.cannotBeIgnored')) { + if ($this->user->isIgnoredUser(\wcf\system\WCF::getUser()->userID)) { + throw new \wcf\system\exception\UserInputException('text', \wcf\system\WCF::getLanguage()->getDynamicVariable('chat.error.whisper.ignoresYou', array('user' => $this->user))); + } + } $this->didInit(); } diff --git a/language/de.xml b/language/de.xml index 0bfda11..93e9e25 100644 --- a/language/de.xml +++ b/language/de.xml @@ -56,6 +56,8 @@ + + @@ -74,6 +76,10 @@ + + + + diff --git a/package.xml b/package.xml index dc8708c..dd9c757 100644 --- a/package.xml +++ b/package.xml @@ -16,7 +16,7 @@ - com.woltlab.wcf + com.woltlab.wcf be.bastelstu.max.wcf.jCounter be.bastelstu.wcf.nodePush diff --git a/template/chat.tpl b/template/chat.tpl index c3383a8..ee6349d 100644 --- a/template/chat.tpl +++ b/template/chat.tpl @@ -106,6 +106,9 @@
+
+ {lang}chat.general.message{/lang} +