add moveModule trigger

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6684 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
haneul 2009-07-08 10:08:17 +00:00
parent 1811fb5e52
commit c1d02fa7d3

View file

@ -48,6 +48,17 @@
$oDB = &DB::getInstance();
$oDB->begin();
$triggerObj->document_srl_list = $document_srl_list;
$triggerObj->module_srl = $module_srl;
$triggerObj->category_srl = $category_srl;
// Call trigger (before)
$output = ModuleHandler::triggerCall('document.moveDocumentModule', 'before', $triggerObj);
if(!$output->toBool()) {
$oDB->rollback();
return $output;
}
for($i=count($document_srl_list)-1;$i>=0;$i--) {
$document_srl = $document_srl_list[$i];
$oDocument = $oDocumentModel->getDocument($document_srl);
@ -141,6 +152,13 @@
$oDB->rollback();
return $output;
}
// Call trigger (before)
$output = ModuleHandler::triggerCall('document.moveDocumentModule', 'after', $triggerObj);
if(!$output->toBool()) {
$oDB->rollback();
return $output;
}
$oDB->commit();
return new Object();