mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
삭제 액션에서 누락된 삭제 쿼리추가 및 댓글 카운터 정상적동할 수 잇도록 개선
This commit is contained in:
parent
2da5f1309e
commit
2d1ba7d26d
2 changed files with 28 additions and 2 deletions
|
|
@ -1263,6 +1263,28 @@ class commentController extends comment
|
|||
}
|
||||
}
|
||||
|
||||
$args = new stdClass();
|
||||
$args->comment_srl = $obj->comment_srl;
|
||||
$output = executeQuery('comment.deleteCommentList', $args);
|
||||
|
||||
// update the number of comments
|
||||
$comment_count = $oCommentModel->getCommentCount($obj->document_srl);
|
||||
|
||||
// only document is exists
|
||||
if(isset($comment_count))
|
||||
{
|
||||
// create the controller object of the document
|
||||
$oDocumentController = getController('document');
|
||||
|
||||
// update comment count of the article posting
|
||||
$output = $oDocumentController->updateCommentCount($obj->document_srl, $comment_count, NULL, FALSE);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
if($oComment->hasUploadedFiles())
|
||||
{
|
||||
$args = new stdClass();
|
||||
|
|
@ -1275,6 +1297,10 @@ class commentController extends comment
|
|||
|
||||
$oDB->commit();
|
||||
|
||||
|
||||
Rhymix\Framework\Storage::deleteEmptyDirectory(RX_BASEDIR . sprintf('files/thumbnails/%s', getNumberingPath($comment_srl, 3)), true);
|
||||
$output->add('document_srl', $obj->document_srl);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue