#19689775 document readed log, voted log delete, when document deleted

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8304 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2011-04-13 01:59:09 +00:00
parent 17c90f8cb2
commit 0e408aa459
3 changed files with 38 additions and 0 deletions

View file

@ -435,6 +435,8 @@ class documentController extends document {
}
// declared document, log delete
$this->_deleteDeclaredDocuments($args);
$this->_deleteDocumentReadedLog($args);
$this->_deleteDocumentVotedLog($args);
// Remove the thumbnail file
FileHandler::removeDir(sprintf('files/cache/thumbnails/%s',getNumberingPath($document_srl, 3)));
@ -456,6 +458,26 @@ class documentController extends document {
executeQuery('document.deleteDocumentDeclaredLog', $documentSrls);
}
/**
* @brief delete readed log
* @param $documentSrls : srls string (ex: 1, 2,56, 88)
* @return void
**/
function _deleteDocumentReadedLog($documentSrls)
{
executeQuery('document.deleteDocumentReadedLog', $documentSrls);
}
/**
* @brief delete voted log
* @param $documentSrls : srls string (ex: 1, 2,56, 88)
* @return void
**/
function _deleteDocumentVotedLog($documentSrls)
{
executeQuery('document.deleteDocumentVotedLog', $documentSrls);
}
/**
* @brief Move the doc into the trash
**/

View file

@ -0,0 +1,8 @@
<query id="deleteDocumentReadedLog" action="delete">
<tables>
<table name="document_readed_log" />
</tables>
<conditions>
<condition operation="in" column="document_srl" var="document_srl" filter="number" notnull="notnull" />
</conditions>
</query>

View file

@ -0,0 +1,8 @@
<query id="deleteDocumentVotedLog" action="delete">
<tables>
<table name="document_voted_log" />
</tables>
<conditions>
<condition operation="in" column="document_srl" var="document_srl" filter="number" notnull="notnull" />
</conditions>
</query>