Fix #1685 보완: 익명 추천 및 스크랩시 회원정보를 처음부터 DB에 저장하지 않도록 변경

This commit is contained in:
Kijin Sung 2021-04-12 23:26:53 +09:00
parent e4f2d8ec25
commit 56aed1fb7b
2 changed files with 11 additions and 7 deletions

View file

@ -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)

View file

@ -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);
}