mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 19:21:40 +09:00
#374 댓글 휴지통 이동 시 파일 삭제 안함
This commit is contained in:
parent
5e8c58b3f0
commit
1309ad4807
2 changed files with 11 additions and 0 deletions
|
|
@ -843,18 +843,27 @@ class commentController extends comment
|
||||||
// call a trigger (after)
|
// call a trigger (after)
|
||||||
if($output->toBool())
|
if($output->toBool())
|
||||||
{
|
{
|
||||||
|
$comment->isMoveToTrash = $isMoveToTrash;
|
||||||
$trigger_output = ModuleHandler::triggerCall('comment.deleteComment', 'after', $comment);
|
$trigger_output = ModuleHandler::triggerCall('comment.deleteComment', 'after', $comment);
|
||||||
if(!$trigger_output->toBool())
|
if(!$trigger_output->toBool())
|
||||||
{
|
{
|
||||||
$oDB->rollback();
|
$oDB->rollback();
|
||||||
return $trigger_output;
|
return $trigger_output;
|
||||||
}
|
}
|
||||||
|
unset($comment->isMoveToTrash);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$isMoveToTrash)
|
if(!$isMoveToTrash)
|
||||||
{
|
{
|
||||||
$this->_deleteDeclaredComments($args);
|
$this->_deleteDeclaredComments($args);
|
||||||
$this->_deleteVotedComments($args);
|
$this->_deleteVotedComments($args);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$args = new stdClass();
|
||||||
|
$args->upload_target_srl = $comment_srl;
|
||||||
|
$args->isvalid = 'N';
|
||||||
|
$output = executeQuery('file.updateFileValid', $args);
|
||||||
}
|
}
|
||||||
|
|
||||||
// commit
|
// commit
|
||||||
|
|
|
||||||
|
|
@ -518,6 +518,8 @@ class fileController extends file
|
||||||
$comment_srl = $obj->comment_srl;
|
$comment_srl = $obj->comment_srl;
|
||||||
if(!$comment_srl) return new Object();
|
if(!$comment_srl) return new Object();
|
||||||
|
|
||||||
|
if($obj->isMoveToTrash) return new Object();
|
||||||
|
|
||||||
$output = $this->deleteFiles($comment_srl);
|
$output = $this->deleteFiles($comment_srl);
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue