Skip to content

Commit

Permalink
Merge 93786f2 into 4237f5c
Browse files Browse the repository at this point in the history
  • Loading branch information
joghurtKULTUR committed Sep 3, 2020
2 parents 4237f5c + 93786f2 commit eb764e0
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/is_offensive.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/CustomBadWordsLoader.php
@@ -1,3 +1,3 @@
<?php

$badwords = array_merge($badwords, json_decode(file_get_contents('/tmp/CustomBadWords.json')));
$badwords = array_merge($badwords, json_decode(file_get_contents(sys_get_temp_dir().'CustomBadWords.json')));
2 changes: 1 addition & 1 deletion src/OffensiveChecker.php
Expand Up @@ -19,7 +19,7 @@ public function __construct(array $blacklist = [], array $whitelist = [])
private function setupBadWords(array $blacklist)
{
if ($blacklist) {
file_put_contents('/tmp/CustomBadWords.json', json_encode($blacklist));
file_put_contents(sys_get_temp_dir().'CustomBadWords.json', json_encode($blacklist));
$this->censor->setDictionary([__DIR__.'/CustomBadWordsLoader.php']);
} else {
$this->censor->setDictionary([__DIR__.'/BadWordsLoader.php']);
Expand Down

0 comments on commit eb764e0

Please sign in to comment.