mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 02:01:40 +09:00
parent
57687c15bc
commit
436ff4bef4
1 changed files with 18 additions and 0 deletions
|
|
@ -194,6 +194,16 @@ class communicationController extends communication
|
|||
$receiver_args->readed = 'N';
|
||||
$receiver_args->regdate = date("YmdHis");
|
||||
|
||||
// Call a trigger (before)
|
||||
$trigger_obj = new stdClass();
|
||||
$trigger_obj->sender = $sender_args;
|
||||
$trigger_obj->receiver = $receiver_args;
|
||||
$trigger_output = ModuleHandler::triggerCall('communication.sendMessage', 'before', $trigger_obj);
|
||||
if(!$trigger_output->toBool())
|
||||
{
|
||||
return $trigger_output;
|
||||
}
|
||||
|
||||
$oDB = DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
||||
|
|
@ -216,6 +226,14 @@ class communicationController extends communication
|
|||
return $output;
|
||||
}
|
||||
|
||||
// Call a trigger (after)
|
||||
$trigger_output = ModuleHandler::triggerCall('communication.sendMessage', 'after', $trigger_obj);
|
||||
if(!$trigger_output->toBool())
|
||||
{
|
||||
$oDB->rollback();
|
||||
return $trigger_output;
|
||||
}
|
||||
|
||||
// create a flag that message is sent (in file format)
|
||||
$flag_path = './files/member_extra_info/new_message_flags/' . getNumberingPath($receiver_srl);
|
||||
FileHandler::makeDir($flag_path);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue