Modify the title of the comment notification e-mail.

This commit is contained in:
BJRambo 2016-07-30 07:49:30 +09:00
parent 68abd0e986
commit bcf6523e81
3 changed files with 13 additions and 10 deletions

View file

@ -638,16 +638,22 @@ class commentController extends comment
$module_info = $oModuleModel->getModuleInfoByDocumentSrl($obj->document_srl);
// If there is no problem to register comment then send an email to all admin were set in module admin panel
if($module_info->admin_mail && $member_info->is_admin != 'Y')
if($module_info->admin_mail/* && $member_info->is_admin != 'Y'*/)
{
$oMail = new Mail();
if($is_logged)
// 메일 발신자 조작으로 취급하여 스팸으로 직행할 수 있기때문에 회원설정에서 입력된 웹마스터 메일주소를 이용하도록 함
$member_config = $oMemberModel->getMemberConfig();
$admin_email_adress = $member_config->webmaster_email;
// 관리자 메일을 입력하지 않으면 메일을 보내지 않음.
if(!$admin_email_adress)
{
$oMail->setSender($obj->email_address, $obj->email_address);
return;
}
$mail_title = "[Rhymix - " . Context::get('mid') . "] A new comment was posted on document: \"" . $oDocument->getTitleText() . "\"";
// 매일 보내는 이를 관리자 계정으로 설정한다.
$oMail->setSender($member_config->webmaster_name, $member_config->webmaster_email);
$mail_title = sprintf(lang('msg_comment_notify_mail'), Context::get('mid'), $oDocument->getTitleText());
//$mail_title = "[" . Context::get('mid') . "] A new comment was posted on document: \"" . $oDocument->getTitleText() . "\"";
$oMail->setTitle($mail_title);
$url_comment = getFullUrl('','document_srl',$obj->document_srl).'#comment_'.$obj->comment_srl;
if($using_validation)
@ -710,7 +716,6 @@ class commentController extends comment
// get all admins emails
$admins_emails = $module_info->admin_mail;
$target_mail = explode(',', $admins_emails);
// send email to all admins - START
for($i = 0; $i < count($target_mail); $i++)
{
@ -719,10 +724,6 @@ class commentController extends comment
{
continue;
}
if(!$is_logged)
{
$oMail->setSender($email_address, $email_address);
}
$oMail->setReceiptor($email_address, $email_address);
$oMail->send();
}