#55 스팸필터 차단 시 발송되었다는 메시지로 잘못 나오는 문제 수정.

This commit is contained in:
bnu 2013-11-23 19:59:00 +09:00
parent d0a02752e6
commit c2b3933831
3 changed files with 12 additions and 12 deletions

View file

@ -114,8 +114,13 @@ class communicationController extends communication
// send a message // send a message
$output = $this->sendMessage($logged_info->member_srl, $receiver_srl, $title, $content); $output = $this->sendMessage($logged_info->member_srl, $receiver_srl, $title, $content);
if(!$output->toBool())
{
return $output;
}
// send an e-mail // send an e-mail
if($output->toBool() && $send_mail == 'Y') if($send_mail == 'Y')
{ {
$view_url = Context::getRequestUri(); $view_url = Context::getRequestUri();
$content = sprintf("%s<br /><br />From : <a href=\"%s\" target=\"_blank\">%s</a>", $content, $view_url, $view_url); $content = sprintf("%s<br /><br />From : <a href=\"%s\" target=\"_blank\">%s</a>", $content, $view_url, $view_url);

View file

@ -176,25 +176,20 @@ class spamfilterController extends spamfilter
function triggerSendMessage(&$obj) function triggerSendMessage(&$obj)
{ {
if($_SESSION['avoid_log']) return new Object(); if($_SESSION['avoid_log']) return new Object();
// Check the login status, login information, and permission
$is_logged = Context::get('is_logged');
$logged_info = Context::get('logged_info'); $logged_info = Context::get('logged_info');
// In case logged in, check if it is an administrator if($logged_info->is_admin == 'Y') return new Object();
if($is_logged)
{
if($logged_info->is_admin == 'Y') return new Object();
}
$oFilterModel = getModel('spamfilter'); $oFilterModel = getModel('spamfilter');
// Check if the IP is prohibited // Check if the IP is prohibited
$output = $oFilterModel->isDeniedIP(); $output = $oFilterModel->isDeniedIP();
if(!$output->toBool()) return $output; if(!$output->toBool()) return $output;
// Check if there is a ban on the word // Check if there is a ban on the word
$text = $obj->title.$obj->content; $text = $obj->title . ' ' . $obj->content;
$output = $oFilterModel->isDeniedWord($text); $output = $oFilterModel->isDeniedWord($text);
if(!$output->toBool()) return $output; if(!$output->toBool()) return $output;
// Check the specified time // Check the specified time
$output = $oFilterModel->checkLimited(); $output = $oFilterModel->checkLimited(TRUE);
if(!$output->toBool()) return $output; if(!$output->toBool()) return $output;
// Save a log // Save a log
$this->insertLog(); $this->insertLog();

View file

@ -120,11 +120,11 @@ class spamfilterModel extends spamfilter
{ {
if($isMessage) if($isMessage)
{ {
$message = sprintf(Context::getLang('msg_alert_limited_by_config'), $interval); $message = sprintf(Context::getLang('msg_alert_limited_message_by_config'), $interval);
} }
else else
{ {
$message = sprintf(Context::getLang('msg_alert_limited_message_by_config'), $interval); $message = sprintf(Context::getLang('msg_alert_limited_by_config'), $interval);
} }
$oSpamFilterController = &getController('spamfilter'); $oSpamFilterController = &getController('spamfilter');