mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 20:44:28 +09:00
Merge pull request #1042 from Xvezda/develop-spam
닉네임, 홈페이지, 태그 필드 스팸 필터링
This commit is contained in:
commit
4191d0d177
1 changed files with 19 additions and 3 deletions
|
|
@ -44,7 +44,15 @@ class spamfilterController extends spamfilter
|
|||
$output = $oFilterModel->isDeniedIP();
|
||||
if(!$output->toBool()) return $output;
|
||||
// Check if there is a ban on the word
|
||||
$text = $obj->title.$obj->content;
|
||||
$text = '';
|
||||
if($is_logged)
|
||||
{
|
||||
$text = $obj->title . ' ' . $obj->content . ' ' . $obj->tags;
|
||||
}
|
||||
else
|
||||
{
|
||||
$text = $obj->title . ' ' . $obj->content . ' ' . $obj->nick_name . ' ' . $obj->homepage . ' ' . $obj->tags;
|
||||
}
|
||||
$output = $oFilterModel->isDeniedWord($text);
|
||||
if(!$output->toBool()) return $output;
|
||||
// Check the specified time beside the modificaiton time
|
||||
|
|
@ -81,7 +89,15 @@ class spamfilterController extends spamfilter
|
|||
$output = $oFilterModel->isDeniedIP();
|
||||
if(!$output->toBool()) return $output;
|
||||
// Check if there is a ban on the word
|
||||
$text = $obj->content;
|
||||
$text = '';
|
||||
if($is_logged)
|
||||
{
|
||||
$text = $obj->content;
|
||||
}
|
||||
else
|
||||
{
|
||||
$text = $obj->content . ' ' . $obj->nick_name . ' ' . $obj->homepage;
|
||||
}
|
||||
$output = $oFilterModel->isDeniedWord($text);
|
||||
if(!$output->toBool()) return $output;
|
||||
// If the specified time check is not modified
|
||||
|
|
@ -113,7 +129,7 @@ class spamfilterController extends spamfilter
|
|||
$output = $oFilterModel->isDeniedIP();
|
||||
if(!$output->toBool()) return $output;
|
||||
// Check if there is a ban on the word
|
||||
$text = $obj->blog_name.$obj->title.$obj->excerpt.$obj->url;
|
||||
$text = $obj->blog_name . ' ' . $obj->title . ' ' . $obj->excerpt . ' ' . $obj->url;
|
||||
$output = $oFilterModel->isDeniedWord($text);
|
||||
if(!$output->toBool()) return $output;
|
||||
// Start Filtering
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue