mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
Merge branch 'dev/005' into dev/006
This commit is contained in:
commit
79f316df8d
1 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue