Skip to content
Snippets Groups Projects
Verified Commit ada3ca71 authored by Florian Azizian's avatar Florian Azizian
Browse files

FEAT #13679 TIE 3:30 continue refactoring notification scripts diffusionTypesController

parent 036348e2
No related branches found
No related tags found
No related merge requests found
......@@ -62,14 +62,14 @@ while ($state != 'END') {
foreach ($events as $event) {
Bt_writeLog(['level' => 'INFO', 'message' => "Getting recipients using diffusion type '".$notification['diffusion_type']."'"]);
// Diffusion type specific recipients
$recipients = \Notification\controllers\DiffusionTypesController::getRecipients(['request' => 'recipients', 'notification' => $notification, 'event' => $event]);
$recipients = \Notification\controllers\DiffusionTypesController::getItemsToNotify(['request' => 'recipients', 'notification' => $notification, 'event' => $event]);
// Diffusion type specific res_id
Bt_writeLog(['level' => 'INFO', 'message' => "Getting document ids using diffusion type '".$notification['diffusion_type']."'"]);
$res_id = false;
if ($event['table_name'] == $coll_table || $event['table_name'] == $coll_view) {
$res_id = $event['record_id'];
} else {
$res_id = \Notification\controllers\DiffusionTypesController::getRecipients(['request' => 'res_id', 'notification' => $notification, 'event' => $event]);
$res_id = \Notification\controllers\DiffusionTypesController::getItemsToNotify(['request' => 'res_id', 'notification' => $notification, 'event' => $event]);
}
$event['res_id'] = $res_id;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment