mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
#19688372 delete voted comment log, when comment deleted
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8299 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
b8b78cb986
commit
dac37ebf53
2 changed files with 35 additions and 3 deletions
|
|
@ -369,6 +369,9 @@
|
|||
}
|
||||
}
|
||||
|
||||
$this->_deleteDeclaredComments($args);
|
||||
$this->_deleteVotedComments($args);
|
||||
|
||||
// commit
|
||||
$oDB->commit();
|
||||
|
||||
|
|
@ -408,18 +411,39 @@
|
|||
// Delete a list of comments
|
||||
$output = executeQuery('comment.deleteCommentsList', $args);
|
||||
|
||||
//delete declared, declared_log
|
||||
//delete declared, declared_log, voted_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);
|
||||
$this->_deleteDeclaredComments($args);
|
||||
$this->_deleteVotedComments($args);
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief delete declared comment, log
|
||||
* @param $commentSrls : srls string (ex: 1, 2,56, 88)
|
||||
* @return void
|
||||
**/
|
||||
function _deleteDeclaredComments($commentSrls)
|
||||
{
|
||||
executeQuery('comment.deleteDeclaredComments', $commentSrls);
|
||||
executeQuery('comment.deleteCommentDeclaredLog', $commentSrls);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief delete voted comment log
|
||||
* @param $commentSrls : srls string (ex: 1, 2,56, 88)
|
||||
* @return void
|
||||
**/
|
||||
function _deleteVotedComments($commentSrls)
|
||||
{
|
||||
executeQuery('comment.deleteCommentVotedLog', $commentSrls);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Increase vote-up counts of the comment
|
||||
**/
|
||||
|
|
|
|||
8
modules/comment/queries/deleteCommentVotedLog.xml
Normal file
8
modules/comment/queries/deleteCommentVotedLog.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<query id="deleteCommentVotedLog" action="delete">
|
||||
<tables>
|
||||
<table name="comment_voted_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