From dbd9c299f5b6cd275122d377356c0af512a43b72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sun, 6 Oct 2013 14:59:53 +0200 Subject: [PATCH 1/6] Add missing
in chat.tpl Fixes #58 --- template/chat.tpl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/template/chat.tpl b/template/chat.tpl index 0ff5b60..15ca252 100644 --- a/template/chat.tpl +++ b/template/chat.tpl @@ -93,6 +93,9 @@
+
+ {lang}chat.general.message{/lang} +
From 5a85be5240eb77fa8e6a7594b93a820873a681ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sun, 6 Oct 2013 16:30:18 +0200 Subject: [PATCH 2/6] Set PAGE_TITLE after installation --- file/acp/be.bastelstu.chat.install.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/file/acp/be.bastelstu.chat.install.php b/file/acp/be.bastelstu.chat.install.php index 194e4e9..a1447c7 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,18 @@ 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(); + } } } $install = new Install(); From 7acf736510e3cea2cd859d4e06aafb03baca2f86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sun, 6 Oct 2013 16:34:40 +0200 Subject: [PATCH 3/6] Activate onlineList dashboard box upon installation --- file/acp/be.bastelstu.chat.install.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/file/acp/be.bastelstu.chat.install.php b/file/acp/be.bastelstu.chat.install.php index a1447c7..1874d45 100644 --- a/file/acp/be.bastelstu.chat.install.php +++ b/file/acp/be.bastelstu.chat.install.php @@ -49,6 +49,11 @@ public function execute() { $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(); From d0d091547c0a7faf1cebb5dcf2a2592f14c1fef7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sun, 6 Oct 2013 17:27:08 +0200 Subject: [PATCH 4/6] Disallow whispering of users that block one Closes #61 --- .../lib/system/command/commands/WhisperCommand.class.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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(); } From 8923703a5e28a727c39cb3a9a136fdbda147a47b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sun, 6 Oct 2013 18:06:24 +0200 Subject: [PATCH 5/6] Add language items for user group options see #55 --- language/de.xml | 6 ++++++ 1 file changed, 6 insertions(+) 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 @@ + + + + From 365a6da278c8ee654cee1fe6fcda7d8e4cdcfe30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sun, 6 Oct 2013 18:14:11 +0200 Subject: [PATCH 6/6] Add SECURITY_TOKEN to forms and bump WCF minimum version see WoltLab/WCF@77329f86c560fe7490b0b2a02905301f6a33dfbd --- acptemplate/roomAdd.tpl | 5 ++--- package.xml | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) 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/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