mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +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;
|
||||
}
|
||||
}
|
||||
// declared document, log delete
|
||||
$this->_deleteDeclaredDocuments($args);
|
||||
|
||||
// Remove the thumbnail file
|
||||
FileHandler::removeDir(sprintf('files/cache/thumbnails/%s',getNumberingPath($document_srl, 3)));
|
||||
|
||||
|
|
@ -442,6 +445,17 @@ class documentController extends document {
|
|||
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
|
||||
**/
|
||||
|
|
@ -707,10 +721,10 @@ class documentController extends document {
|
|||
$oDocumentModel = &getModel('document');
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl, false, false);
|
||||
// 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;
|
||||
return new Object(-1, 'failed_declared');
|
||||
}
|
||||
}*/
|
||||
// Check if document's author is a member.
|
||||
if($oDocument->get('member_srl')) {
|
||||
// Create a member model object
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue