삭제한 댓글을 다시 삭제하지 않도록 기록

This commit is contained in:
Johnny 2022-03-24 19:13:59 +09:00
parent e8f431d691
commit b4b1188081

View file

@ -11,7 +11,8 @@
*/
class commentController extends comment
{
private $deleteCommentSrls = array();
/**
* Initialization
* @return void
@ -1048,6 +1049,13 @@ class commentController extends comment
{
// check if comment already exists
$comment = CommentModel::getComment($comment_srl);
// 이미 삭제한 댓글을 다시 삭제를 실행할 의무는 없으므로 넘겨버림.
if($this->deleteCommentSrls[$comment_srl])
{
return new BaseObject();
}
if(!$comment->isExists())
{
return new BaseObject(-1, 'msg_not_founded');
@ -1181,6 +1189,8 @@ class commentController extends comment
// Remove the thumbnail file
Rhymix\Framework\Storage::deleteDirectory(RX_BASEDIR . sprintf('files/thumbnails/%s', getNumberingPath($comment_srl, 3)));
$this->deleteCommentSrls[$comment_srl] = true;
// commit
$oDB->commit();