diff --git a/ecrire/action/editer_objet.php b/ecrire/action/editer_objet.php index 24f84b9cd783755eb71c6b7b3d94b3df22a3f00f..b9cc68ee9aae71a2fac16a18290dc2cb67daee62 100644 --- a/ecrire/action/editer_objet.php +++ b/ecrire/action/editer_objet.php @@ -295,6 +295,18 @@ function objet_inserer($objet, $id_parent = null, $set = null) { ] ); } + + // Appeler une notification + if ($notifications = charger_fonction('notifications', 'inc')) { + $notifications( + "{$objet}_inserer", + $id, + array( + 'id_parent' => $id_parent, + 'champs' => $champs, + ) + ); + } return $id; } @@ -471,6 +483,20 @@ function objet_instituer($objet, $id, $c, $calcul_rub = true) { // Notifications if ($notifications = charger_fonction('notifications', 'inc')) { + $notifications( + "{$objet}_instituer", + $id, + array( + 'statut' => $statut, + 'statut_ancien' => $statut_ancien, + 'date' => $date, + 'date_ancienne' => $date_ancienne, + 'id_parent_ancien' => $id_rubrique, + 'champs' => $champs + ) + ); + + // Rétro-compat $notifications( "instituer$objet", $id, diff --git a/ecrire/inc/modifier.php b/ecrire/inc/modifier.php index c91ffa392f1d479a5d526aec77151988dafd6692..c401debfb2eefcbc892b3e2d1e8818c3809c1772 100644 --- a/ecrire/inc/modifier.php +++ b/ecrire/inc/modifier.php @@ -311,6 +311,17 @@ function objet_modifier_champs($objet, $id_objet, $options, $c = null, $serveur ] ); } + + // Appeler une notification + if ($notifications = charger_fonction('notifications', 'inc')) { + $notifications( + "{$objet}_modifier", + $id_objet, + array( + 'champs' => $champs, + ) + ); + } // journaliser l'affaire // message a affiner :-)