mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
issue 915 add trigger in copyDocumentModule method
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10351 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
36a08228df
commit
573cf10452
1 changed files with 18 additions and 0 deletions
|
|
@ -183,6 +183,16 @@
|
|||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
||||
$triggerObj->document_srls = implode(',',$document_srl_list);
|
||||
$triggerObj->module_srl = $module_srl;
|
||||
$triggerObj->category_srl = $category_srl;
|
||||
// Call a trigger (before)
|
||||
$output = ModuleHandler::triggerCall('document.copyDocumentModule', 'before', $triggerObj);
|
||||
if(!$output->toBool()) {
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
|
||||
$extraVarsList = $oDocumentModel->getDocumentExtraVarsFromDB($document_srl_list);
|
||||
$extraVarsListByDocumentSrl = array();
|
||||
if(is_array($extraVarsList->data))
|
||||
|
|
@ -338,6 +348,14 @@
|
|||
|
||||
$copied_srls[$document_srl] = $obj->document_srl;
|
||||
}
|
||||
|
||||
// Call a trigger (before)
|
||||
$output = ModuleHandler::triggerCall('document.copyDocumentModule', 'after', $triggerObj);
|
||||
if(!$output->toBool()) {
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
|
||||
$oDB->commit();
|
||||
|
||||
$output = new Object();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue