mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-26 14:49:56 +09:00
add moveModule trigger
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6684 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
1811fb5e52
commit
c1d02fa7d3
1 changed files with 18 additions and 0 deletions
|
|
@ -48,6 +48,17 @@
|
||||||
$oDB = &DB::getInstance();
|
$oDB = &DB::getInstance();
|
||||||
$oDB->begin();
|
$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--) {
|
for($i=count($document_srl_list)-1;$i>=0;$i--) {
|
||||||
$document_srl = $document_srl_list[$i];
|
$document_srl = $document_srl_list[$i];
|
||||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||||
|
|
@ -141,6 +152,13 @@
|
||||||
$oDB->rollback();
|
$oDB->rollback();
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Call trigger (before)
|
||||||
|
$output = ModuleHandler::triggerCall('document.moveDocumentModule', 'after', $triggerObj);
|
||||||
|
if(!$output->toBool()) {
|
||||||
|
$oDB->rollback();
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
|
||||||
$oDB->commit();
|
$oDB->commit();
|
||||||
return new Object();
|
return new Object();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue