mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
#19688739 delete declared document log, when document deleted
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8301 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
dac37ebf53
commit
ad4c2c54cd
2 changed files with 24 additions and 2 deletions
|
|
@ -433,6 +433,9 @@ class documentController extends document {
|
||||||
return $trigger_output;
|
return $trigger_output;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// declared document, log delete
|
||||||
|
$this->_deleteDeclaredDocuments($args);
|
||||||
|
|
||||||
// Remove the thumbnail file
|
// Remove the thumbnail file
|
||||||
FileHandler::removeDir(sprintf('files/cache/thumbnails/%s',getNumberingPath($document_srl, 3)));
|
FileHandler::removeDir(sprintf('files/cache/thumbnails/%s',getNumberingPath($document_srl, 3)));
|
||||||
|
|
||||||
|
|
@ -442,6 +445,17 @@ class documentController extends document {
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief delete declared document, log
|
||||||
|
* @param $documentSrls : srls string (ex: 1, 2,56, 88)
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
function _deleteDeclaredDocuments($documentSrls)
|
||||||
|
{
|
||||||
|
executeQuery('document.deleteDeclaredDocuments', $documentSrls);
|
||||||
|
executeQuery('document.deleteDocumentDeclaredLog', $documentSrls);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Move the doc into the trash
|
* @brief Move the doc into the trash
|
||||||
**/
|
**/
|
||||||
|
|
@ -707,10 +721,10 @@ class documentController extends document {
|
||||||
$oDocumentModel = &getModel('document');
|
$oDocumentModel = &getModel('document');
|
||||||
$oDocument = $oDocumentModel->getDocument($document_srl, false, false);
|
$oDocument = $oDocumentModel->getDocument($document_srl, false, false);
|
||||||
// Pass if the author's IP address is as same as visitor's.
|
// Pass if the author's IP address is as same as visitor's.
|
||||||
if($oDocument->get('ipaddress') == $_SERVER['REMOTE_ADDR']) {
|
/*if($oDocument->get('ipaddress') == $_SERVER['REMOTE_ADDR']) {
|
||||||
$_SESSION['declared_document'][$document_srl] = true;
|
$_SESSION['declared_document'][$document_srl] = true;
|
||||||
return new Object(-1, 'failed_declared');
|
return new Object(-1, 'failed_declared');
|
||||||
}
|
}*/
|
||||||
// Check if document's author is a member.
|
// Check if document's author is a member.
|
||||||
if($oDocument->get('member_srl')) {
|
if($oDocument->get('member_srl')) {
|
||||||
// Create a member model object
|
// Create a member model object
|
||||||
|
|
|
||||||
8
modules/document/queries/deleteDocumentDeclaredLog.xml
Normal file
8
modules/document/queries/deleteDocumentDeclaredLog.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
<query id="deleteDocumentDeclaredLog" action="delete">
|
||||||
|
<tables>
|
||||||
|
<table name="document_declared_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