mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-04 01:23:32 +09:00
#18973659 document trash/ restore 시 트리거 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7553 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
7cd5b7dea7
commit
248373bc2c
2 changed files with 20 additions and 1 deletions
|
|
@ -529,6 +529,15 @@
|
||||||
executeQuery('file.updateFileValid', $args);
|
executeQuery('file.updateFileValid', $args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// trigger 호출 (after)
|
||||||
|
if($output->toBool()) {
|
||||||
|
$trigger_output = ModuleHandler::triggerCall('document.restoreTrash', 'after', $document_args);
|
||||||
|
if(!$trigger_output->toBool()) {
|
||||||
|
$oDB->rollback();
|
||||||
|
return $trigger_output;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// commit
|
// commit
|
||||||
$oDB->commit();
|
$oDB->commit();
|
||||||
return $output;
|
return $output;
|
||||||
|
|
|
||||||
|
|
@ -481,6 +481,7 @@
|
||||||
$oDocument = $oDocumentModel->getDocument($obj->document_srl);
|
$oDocument = $oDocumentModel->getDocument($obj->document_srl);
|
||||||
|
|
||||||
$trash_args->module_srl = $oDocument->get('module_srl');
|
$trash_args->module_srl = $oDocument->get('module_srl');
|
||||||
|
$obj->module_srl = $oDocument->get('module_srl');
|
||||||
|
|
||||||
// 휴지통 문서를 두번 휴지통에 버릴 수 없음.
|
// 휴지통 문서를 두번 휴지통에 버릴 수 없음.
|
||||||
if($trash_args->module_srl == 0) return false;
|
if($trash_args->module_srl == 0) return false;
|
||||||
|
|
@ -531,7 +532,16 @@
|
||||||
executeQuery('file.updateFileValid', $args);
|
executeQuery('file.updateFileValid', $args);
|
||||||
}
|
}
|
||||||
|
|
||||||
// commit
|
// trigger 호출 (after)
|
||||||
|
if($output->toBool()) {
|
||||||
|
$trigger_output = ModuleHandler::triggerCall('document.moveDocumentToTrash', 'after', $obj);
|
||||||
|
if(!$trigger_output->toBool()) {
|
||||||
|
$oDB->rollback();
|
||||||
|
return $trigger_output;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// commit
|
||||||
$oDB->commit();
|
$oDB->commit();
|
||||||
|
|
||||||
return $output;
|
return $output;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue