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