mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41:40 +09:00
Fix #1987 메소드 이름을 공용으로 변경하고 게시글을 삭제할때 플래그 파일도 삭제
This commit is contained in:
parent
4c3802da39
commit
7179f9885a
3 changed files with 24 additions and 4 deletions
|
|
@ -873,7 +873,7 @@ class ncenterliteController extends ncenterlite
|
|||
return;
|
||||
}
|
||||
|
||||
$notify_list = ncenterliteModel::getInstance()->getNotifyMemberSrlByCommentSrl($obj->comment_srl);
|
||||
$notify_list = ncenterliteModel::getInstance()->getNotifyMemberSrlBySrl($obj->comment_srl);
|
||||
|
||||
// 대댓글의 대댓글일 경우 혹은 중복적으로 받는 경우 comment_srl 당 2개이상 notify가 생성될 수 있다.
|
||||
$member_srls = array();
|
||||
|
|
@ -904,7 +904,19 @@ class ncenterliteController extends ncenterlite
|
|||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$notify_list = ncenterliteModel::getInstance()->getNotifyMemberSrlBySrl($obj->document_srl);
|
||||
|
||||
// 대댓글의 대댓글일 경우 혹은 중복적으로 받는 경우 comment_srl 당 2개이상 notify가 생성될 수 있다.
|
||||
$member_srls = array();
|
||||
foreach($notify_list as $value)
|
||||
{
|
||||
if(!in_array($value->member_srl, $member_srls))
|
||||
{
|
||||
$member_srls[] = $value->member_srl;
|
||||
}
|
||||
}
|
||||
|
||||
$args = new stdClass();
|
||||
$args->srl = $obj->document_srl;
|
||||
$output = executeQuery('ncenterlite.deleteNotifyBySrl', $args);
|
||||
|
|
@ -912,6 +924,14 @@ class ncenterliteController extends ncenterlite
|
|||
{
|
||||
return $output;
|
||||
}
|
||||
|
||||
if($output->toBool())
|
||||
{
|
||||
foreach($member_srls as $member_srl)
|
||||
{
|
||||
$this->removeFlagFile($member_srl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function triggerAfterMoveToTrash(&$obj)
|
||||
|
|
|
|||
|
|
@ -755,7 +755,7 @@ class ncenterliteModel extends ncenterlite
|
|||
return $output->data;
|
||||
}
|
||||
|
||||
function getNotifyMemberSrlByCommentSrl($comment_srl)
|
||||
function getNotifyMemberSrlBySrl($comment_srl)
|
||||
{
|
||||
if(!$comment_srl === null)
|
||||
{
|
||||
|
|
@ -763,7 +763,7 @@ class ncenterliteModel extends ncenterlite
|
|||
}
|
||||
$args = new stdClass();
|
||||
$args->srl = $comment_srl;
|
||||
$output = executeQueryArray('ncenterlite.getNotifyMemberSrlByCommentSrl', $args);
|
||||
$output = executeQueryArray('ncenterlite.getNotifyMemberSrlBySrl', $args);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue