닉네임, 홈페이지, 태그 필드 스팸 필터링

This commit is contained in:
Xvezda 2014-11-16 22:06:32 +09:00 committed by bnu
parent 21961fb3e9
commit 5cf629be4f

View file

@ -44,7 +44,14 @@ 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;
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 +88,14 @@ class spamfilterController extends spamfilter
$output = $oFilterModel->isDeniedIP();
if(!$output->toBool()) return $output;
// Check if there is a ban on the word
$text = $obj->content;
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