Add to processing in accordance with the set value.

This commit is contained in:
BJRambo 2016-05-13 21:58:47 +09:00
parent ba4746f0fe
commit 173dd35d42
2 changed files with 24 additions and 5 deletions

View file

@ -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

View file

@ -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