From f72db5731e9884713cbaede05f2509a23e731647 Mon Sep 17 00:00:00 2001 From: chicpro Date: Thu, 6 Feb 2014 16:14:54 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B2=8C=EC=8B=9C=EA=B8=80=20=EC=9E=91?= =?UTF-8?q?=EC=84=B1=20=EC=8B=9C=20=EB=A9=94=EC=9D=BC=20=EB=B0=9C=EC=86=A1?= =?UTF-8?q?=20=EC=BD=94=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/write_comment_update.php | 23 ++++++++++------------- bbs/write_update.php | 22 +++++++++------------- 2 files changed, 19 insertions(+), 26 deletions(-) diff --git a/bbs/write_comment_update.php b/bbs/write_comment_update.php index dddbff657..78b49cdb0 100644 --- a/bbs/write_comment_update.php +++ b/bbs/write_comment_update.php @@ -218,20 +218,17 @@ if ($w == 'c') // 댓글 입력 // 최고관리자에게 보내는 메일 if ($config['cf_email_wr_super_admin']) $array_email[] = $super_admin['mb_email']; - // 옵션에 메일받기가 체크되어 있고, 게시자의 메일이 있다면 - if (strstr($wr['wr_option'], 'mail') && $wr['wr_email']) { - // 원글 메일발송에 체크가 되어 있다면 - if ($config['cf_email_wr_write']) $array_email[] = $wr['wr_email']; + // 원글게시자에게 보내는 메일 + if ($config['cf_email_wr_write']) $array_email[] = $wr['wr_email']; - // 댓글 쓴 모든이에게 메일 발송이 되어 있다면 (자신에게는 발송하지 않는다) - if ($config['cf_email_wr_comment_all']) { - $sql = " select distinct wr_email from {$write_table} - where wr_email not in ( '{$wr['wr_email']}', '{$member['mb_email']}', '' ) - and wr_parent = '$wr_id' "; - $result = sql_query($sql); - while ($row=sql_fetch_array($result)) - $array_email[] = $row['wr_email']; - } + // 댓글 쓴 모든이에게 메일 발송이 되어 있다면 (자신에게는 발송하지 않는다) + if ($config['cf_email_wr_comment_all']) { + $sql = " select distinct wr_email from {$write_table} + where wr_email not in ( '{$wr['wr_email']}', '{$member['mb_email']}', '' ) + and wr_parent = '$wr_id' "; + $result = sql_query($sql); + while ($row=sql_fetch_array($result)) + $array_email[] = $row['wr_email']; } // 중복된 메일 주소는 제거 diff --git a/bbs/write_update.php b/bbs/write_update.php index 9ac58e347..0b71d3306 100644 --- a/bbs/write_update.php +++ b/bbs/write_update.php @@ -604,22 +604,18 @@ if (!($w == 'u' || $w == 'cu') && $config['cf_email_use'] && $board['bo_use_emai // 최고관리자에게 보내는 메일 if ($config['cf_email_wr_super_admin']) $array_email[] = $super_admin['mb_email']; - // 옵션에 메일받기가 체크되어 있고, 게시자의 메일이 있다면 - if (strstr($wr['wr_option'], 'mail') && $wr['wr_email']) { - // 원글 메일발송에 체크가 되어 있다면 - if ($config['cf_email_wr_write']) $array_email[] = $wr['wr_email']; + // 원글게시자에게 보내는 메일 + if ($config['cf_email_wr_write']) { + if($w == '') + $wr['wr_email'] = $wr_email; - // 코멘트 쓴 모든이에게 메일 발송이 되어 있다면 (자신에게는 발송하지 않는다) - if ($config['cf_email_wr_comment_all']) { - $sql = " select distinct wr_email from {$write_table} - where wr_email not in ( '{$wr['wr_email']}', '{$member['mb_email']}', '' ) - and wr_parent = '{$wr_id}' "; - $result = sql_query($sql); - while ($row=sql_fetch_array($result)) - $array_email[] = $row['wr_email']; - } + $array_email[] = $wr['wr_email']; } + // 옵션에 메일받기가 체크되어 있고, 게시자의 메일이 있다면 + if (strstr($wr['wr_option'], 'mail') && $wr['wr_email']) + $array_email[] = $wr['wr_email']; + // 중복된 메일 주소는 제거 $unique_email = array_unique($array_email); $unique_email = array_values($unique_email);