From: Tim Düsterhus Date: Mon, 25 Oct 2021 09:16:06 +0000 (+0200) Subject: Stop checking the `enable_censorship` option X-Git-Tag: 5.5.0_Alpha_1~40 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9da2ca0e9dee9f313ec2ff5bbcb3a97a520bcf12;p=GitHub%2FWoltLab%2Fcom.woltlab.wcf.conversation.git Stop checking the `enable_censorship` option see WoltLab/WCF#4567 --- diff --git a/files/lib/data/conversation/message/ConversationMessageAction.class.php b/files/lib/data/conversation/message/ConversationMessageAction.class.php index 6118f93..65ff994 100644 --- a/files/lib/data/conversation/message/ConversationMessageAction.class.php +++ b/files/lib/data/conversation/message/ConversationMessageAction.class.php @@ -584,18 +584,15 @@ class ConversationMessageAction extends AbstractDatabaseObjectAction implements ); } - // search for censored words - if (ENABLE_CENSORSHIP) { - $result = Censorship::getInstance()->test($message); - if ($result) { - throw new UserInputException( - 'message', - WCF::getLanguage()->getDynamicVariable( - 'wcf.message.error.censoredWordsFound', - ['censoredWords' => $result] - ) - ); - } + $censoredWords = Censorship::getInstance()->test($message); + if ($censoredWords) { + throw new UserInputException( + 'message', + WCF::getLanguage()->getDynamicVariable( + 'wcf.message.error.censoredWordsFound', + ['censoredWords' => $censoredWords] + ) + ); } }