mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
#19688263 delete declared comment data when comment delete
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8297 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
ba9401bfcb
commit
abaa7fbfff
2 changed files with 19 additions and 0 deletions
|
|
@ -390,7 +390,9 @@
|
|||
$args->document_srl = $document_srl;
|
||||
$comments = executeQueryArray('comment.getAllComments',$args);
|
||||
if($comments->data) {
|
||||
$commentSrlList = array();
|
||||
foreach($comments->data as $key => $comment) {
|
||||
array_push($commentSrlList, $comment->comment_srl);
|
||||
// call a trigger (before)
|
||||
$output = ModuleHandler::triggerCall('comment.deleteComment', 'before', $comment);
|
||||
if(!$output->toBool()) continue;
|
||||
|
|
@ -406,6 +408,15 @@
|
|||
// Delete a list of comments
|
||||
$output = executeQuery('comment.deleteCommentsList', $args);
|
||||
|
||||
//delete declared, declared_log
|
||||
if(is_array($commentSrlList) && count($commentSrlList)>0)
|
||||
{
|
||||
unset($args);
|
||||
$args->comment_srl = join(',', $commentSrlList);
|
||||
$tmpOutput1 = executeQuery('comment.deleteDeclaredComments', $args);
|
||||
$tmpOutput2 = executeQuery('comment.deleteCommentDeclaredLog', $args);
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
|
|||
8
modules/comment/queries/deleteCommentDeclaredLog.xml
Normal file
8
modules/comment/queries/deleteCommentDeclaredLog.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<query id="deleteCommentDeclaredLog" action="delete">
|
||||
<tables>
|
||||
<table name="comment_declared_log" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="in" column="comment_srl" var="comment_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
Loading…
Add table
Add a link
Reference in a new issue