diff --git a/modules/ncenterlite/ncenterlite.controller.php b/modules/ncenterlite/ncenterlite.controller.php index eaf70b213..9e331f5ca 100644 --- a/modules/ncenterlite/ncenterlite.controller.php +++ b/modules/ncenterlite/ncenterlite.controller.php @@ -695,7 +695,7 @@ class ncenterliteController extends ncenterlite $args->regdate = date('YmdHis'); $args->notify = $this->_getNotifyId($args); $args->target_url = getNotEncodedUrl('', 'mid', $module_info->mid, 'document_srl', $obj->document_srl); - $output = $this->_insertNotify($args); + $output = $this->_insertNotify($args, $config->anonymous_scrap !== 'N'); if(!$output->toBool()) { return $output; @@ -740,7 +740,7 @@ class ncenterliteController extends ncenterlite $args->notify = $this->_getNotifyId($args); $args->target_url = getNotEncodedUrl('', 'mid', $module_info->mid, 'document_srl', $obj->document_srl); $args->module_srl = $obj->module_srl; - $this->_insertNotify($args); + $this->_insertNotify($args, $config->anonymous_voter !== 'N'); } function triggerAfterDocumentVotedCancel($obj) @@ -813,7 +813,7 @@ class ncenterliteController extends ncenterlite $args->module_srl = $obj->module_srl; $args->notify = $this->_getNotifyId($args); $args->target_url = getNotEncodedUrl('', 'mid', $module_info->mid, 'document_srl', $document_srl, 'comment_srl', $obj->comment_srl) . '#comment_' . $obj->comment_srl; - $this->_insertNotify($args); + $this->_insertNotify($args, $config->anonymous_voter !== 'N'); } function triggerAfterCommentVotedCancel($obj) diff --git a/modules/ncenterlite/ncenterlite.model.php b/modules/ncenterlite/ncenterlite.model.php index 729bab8b4..dfa317644 100644 --- a/modules/ncenterlite/ncenterlite.model.php +++ b/modules/ncenterlite/ncenterlite.model.php @@ -71,6 +71,10 @@ class ncenterliteModel extends ncenterlite { $config->anonymous_voter = 'N'; } + if(!$config->anonymous_scrap) + { + $config->anonymous_scrap = 'N'; + } if(!$config->highlight_effect) { $config->highlight_effect = 'Y'; @@ -284,11 +288,11 @@ class ncenterliteModel extends ncenterlite $v->url = getUrl('','act','procNcenterliteRedirect', 'notify', $v->notify); if(($v->target_type === $this->_TYPE_VOTED && $config->anonymous_voter === 'Y') || ($v->target_type === $this->_TYPE_SCRAPPED && $config->anonymous_scrap === 'Y')) { - $v->target_member_srl = $member_srl; + $v->target_member_srl = 0; $v->target_nick_name = lang('anonymous'); $v->target_user_id = $v->target_email_address = 'anonymous'; } - if($v->target_member_srl && ($v->target_type !== $this->_TYPE_VOTED || $v->target_type !== $this->_TYPE_SCRAPPED)) + if($v->target_member_srl) { $profileImage = $oMemberModel->getProfileImage($v->target_member_srl); $v->profileImage = $profileImage->src; @@ -639,7 +643,7 @@ class ncenterliteModel extends ncenterlite // Voted. case 'V': - if($config->anonymous_voter !== 'N') + if($config->anonymous_voter !== 'N' || $notification->target_member_srl == 0) { $str = sprintf(lang('ncenterlite_vote_anonymous'), $notification->target_summary, $type); } @@ -651,7 +655,7 @@ class ncenterliteModel extends ncenterlite // Scrapped. case 'R': - if($config->anonymous_scrap !== 'N') + if($config->anonymous_scrap !== 'N' || $notification->target_member_srl == 0) { $str = sprintf(lang('ncenterlite_scrap_anonymous'), $notification->target_summary, $type); }