Merge branch 'dev/005' into dev/006

This commit is contained in:
Roman Kelesidis 2025-06-18 07:51:45 +03:00 committed by GitHub
commit 79f316df8d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -67,7 +67,7 @@ class Censor
{
global $datastore;
if (!config()->get('use_word_censor')) {
if (!$this->isEnabled()) {
return;
}
@ -88,6 +88,10 @@ class Censor
*/
public function censorString(string $word): string
{
if (!$this->isEnabled()) {
return $word;
}
return preg_replace($this->words, $this->replacements, $word);
}