File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,8 +72,6 @@ function plugin_init_satisfaction()
7272 $ PLUGIN_HOOKS ['pre_item_update ' ]['satisfaction ' ][TicketSatisfaction::class] = [
7373 SurveyAnswer::class, 'preUpdateSatisfaction ' ];
7474
75- $ PLUGIN_HOOKS ['item_get_events ' ]['satisfaction ' ] =
76- ['NotificationTargetTicket ' => [NotificationTargetTicket::class, 'addEvents ' ]];
7775
7876 $ PLUGIN_HOOKS ['item_delete ' ]['satisfaction ' ] = ['Ticket ' => [Reminder::class, 'deleteItem ' ]];
7977
@@ -94,6 +92,9 @@ function plugin_init_satisfaction()
9492 }
9593 }
9694
95+ $ PLUGIN_HOOKS ['item_get_events ' ]['satisfaction ' ] =
96+ ['NotificationTargetTicket ' => [NotificationTargetTicket::class, 'addEvents ' ]];
97+
9798 $ PLUGIN_HOOKS ['item_get_datas ' ]['satisfaction ' ] = [
9899 NotificationTargetTicket::class => [SurveyAnswer::class,
99100 'addNotificationDatas ' ]];
Original file line number Diff line number Diff line change @@ -55,9 +55,10 @@ public function getEvents()
5555
5656 public static function addEvents (\NotificationTargetTicket $ target )
5757 {
58-
59- $ target ->events ['survey_reminder ' ]
60- = __ ('Survey Reminder ' , 'satisfaction ' );
58+ if (!isset ($ target ->events ['survey_reminder ' ])) {
59+ $ target ->events ['survey_reminder ' ]
60+ = __ ('Survey Reminder ' , 'satisfaction ' );
61+ }
6162 }
6263
6364 public function addDataForTemplate ($ event , $ options = []) {
You can’t perform that action at this time.
0 commit comments