#19745697 trash module makem

document, comment module modify, because object in to trash and trash restore to object feature


git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8388 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2011-05-23 04:48:43 +00:00
parent 9e04e84a65
commit 8f3df45a2a
30 changed files with 949 additions and 34 deletions

View file

@ -322,7 +322,7 @@
/**
* @brief Delete comment
**/
function deleteComment($comment_srl, $is_admin = false) {
function deleteComment($comment_srl, $is_admin = false, $isMoveToTrash = false) {
// create the comment model object
$oCommentModel = &getModel('comment');
// check if comment already exists
@ -369,8 +369,11 @@
}
}
$this->_deleteDeclaredComments($args);
$this->_deleteVotedComments($args);
if(!$isMoveToTrash)
{
$this->_deleteDeclaredComments($args);
$this->_deleteVotedComments($args);
}
// commit
$oDB->commit();
@ -379,6 +382,15 @@
return $output;
}
/**
* @brief remove all comment relation log
**/
function deleteCommentLog()
{
$this->_deleteDeclaredComments($args);
$this->_deleteVotedComments($args);
}
/**
* @brief remove all comments of the article
**/