mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-21 19:32:15 +09:00
Add to processing in accordance with the set value.
This commit is contained in:
parent
ba4746f0fe
commit
173dd35d42
2 changed files with 24 additions and 5 deletions
|
|
@ -292,13 +292,26 @@ class boardController extends board
|
|||
}
|
||||
}
|
||||
// generate document module controller object
|
||||
$oTrashModel = getModel('trash');
|
||||
$config = $oTrashModel->getConfig();
|
||||
$oDocumentController = getController('document');
|
||||
|
||||
// delete the document
|
||||
$output = $oDocumentController->deleteDocument($document_srl, $this->grant->manager);
|
||||
if(!$output->toBool())
|
||||
if($config->trash_use == 'Y')
|
||||
{
|
||||
return $output;
|
||||
// move the trash
|
||||
$output = $oDocumentController->moveDocumentToTrash($oDocument);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// delete the document
|
||||
$output = $oDocumentController->deleteDocument($document_srl, $this->grant->manager);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
// alert an message
|
||||
|
|
|
|||
|
|
@ -1062,6 +1062,12 @@ class documentController extends document
|
|||
$oDB->rollback();
|
||||
return $trigger_output;
|
||||
}
|
||||
$trigger_deletedocument = ModuleHandler::triggerCall('document.deleteDocument', 'after', $obj);
|
||||
if(!$trigger_deletedocument)
|
||||
{
|
||||
$oDB->rollback();
|
||||
return $trigger_deletedocument;
|
||||
}
|
||||
}
|
||||
|
||||
// commit
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue