mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
#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:
parent
17c90f8cb2
commit
0e408aa459
3 changed files with 38 additions and 0 deletions
|
|
@ -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
|
||||
**/
|
||||
|
|
|
|||
8
modules/document/queries/deleteDocumentReadedLog.xml
Normal file
8
modules/document/queries/deleteDocumentReadedLog.xml
Normal 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>
|
||||
8
modules/document/queries/deleteDocumentVotedLog.xml
Normal file
8
modules/document/queries/deleteDocumentVotedLog.xml
Normal 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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue