mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-04 01:23:32 +09:00
삭제 액션에서 누락된 삭제 쿼리추가 및 댓글 카운터 정상적동할 수 잇도록 개선
This commit is contained in:
parent
2da5f1309e
commit
2d1ba7d26d
2 changed files with 28 additions and 2 deletions
|
|
@ -471,9 +471,9 @@ class commentAdminController extends comment
|
||||||
|
|
||||||
$oComment = $oCommentModel->getComment($originObject->comment_srl);
|
$oComment = $oCommentModel->getComment($originObject->comment_srl);
|
||||||
|
|
||||||
if($oComment)
|
if($oComment->isExists())
|
||||||
{
|
{
|
||||||
$output = $oCommentController->updateCommentByRestore($originObject);
|
$output = $oCommentController->updateCommentByRestore($obj);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -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())
|
if($oComment->hasUploadedFiles())
|
||||||
{
|
{
|
||||||
$args = new stdClass();
|
$args = new stdClass();
|
||||||
|
|
@ -1275,6 +1297,10 @@ class commentController extends comment
|
||||||
|
|
||||||
$oDB->commit();
|
$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;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue