Add trigger before insertNotify so that notifications can be canceled

This commit is contained in:
Kijin Sung 2019-03-06 01:01:49 +09:00
parent e60fab4969
commit 0263f63e41

View file

@ -1103,6 +1103,12 @@ class ncenterliteController extends ncenterlite
$args->target_email_address = '';
}
$trigger_output = ModuleHandler::triggerCall('ncenterlite._insertNotify', 'before', $args);
if(!$trigger_output->toBool() || $trigger_output->getMessage() === 'cancel')
{
return $trigger_output;
}
$output = executeQuery('ncenterlite.insertNotify', $args);
if($output->toBool())
{