Skip to content

Commit

Permalink
fix #1693 비회원의 글을 메일로 발송시 발송자가 비어 있을수 있는 문제 수정 (#1695)
Browse files Browse the repository at this point in the history
* fix #1693 비회원의 글을 메일로 발송시 발송자가 비어 있을수 있는 문제 수정

* Update board.controller.php
  • Loading branch information
YJSoft authored and bnu committed Aug 30, 2016
1 parent a12690c commit 6a45701
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/board/board.controller.php
Expand Up @@ -144,10 +144,13 @@ function procBoardInsertDocument()
// send an email to admin user
if($output->toBool() && $this->module_info->admin_mail)
{
$oModuleModel = getModel('module');
$member_config = $oModuleModel->getModuleConfig('member');

$oMail = new Mail();
$oMail->setTitle($obj->title);
$oMail->setContent( sprintf("From : <a href=\"%s\">%s</a><br/>\r\n%s", getFullUrl('','document_srl',$obj->document_srl), getFullUrl('','document_srl',$obj->document_srl), $obj->content));
$oMail->setSender($obj->user_name, $obj->email_address);
$oMail->setSender($obj->user_name ? $obj->user_name : 'anonymous', $obj->email_address ? $obj->email_address : $member_config->webmaster_email);

$target_mail = explode(',',$this->module_info->admin_mail);
for($i=0;$i<count($target_mail);$i++)
Expand Down

0 comments on commit 6a45701

Please sign in to comment.