#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:
ovclas 2011-04-12 07:20:47 +00:00
parent b8b78cb986
commit dac37ebf53
2 changed files with 35 additions and 3 deletions

View file

@ -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
**/