mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
Remove unnecessary regexp in isDeniedWord()
This commit is contained in:
parent
e2df99d440
commit
2b798bffb7
1 changed files with 3 additions and 4 deletions
|
|
@ -80,11 +80,10 @@ class spamfilterModel extends spamfilter
|
|||
$word_list = $this->getDeniedWordList();
|
||||
if(!count($word_list)) return new Object();
|
||||
|
||||
$count = count($word_list);
|
||||
for($i=0;$i<$count;$i++)
|
||||
foreach ($word_list as $word_item)
|
||||
{
|
||||
$word = $word_list[$i]->word;
|
||||
if(preg_match('/'.preg_quote($word,'/').'/is', $text))
|
||||
$word = $word_item->word;
|
||||
if (strpos($text, $word) !== false)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->word = $word;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue