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

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