From f98a51f9b1d4f2c92f441902f523489229090f97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Anne?= Date: Fri, 25 May 2018 17:15:39 +0200 Subject: [PATCH] Fix NotificationTarget::datas deprecated access --- hook.php | 2 +- inc/notificationtargetexample.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hook.php b/hook.php index 49bfa66..756debb 100644 --- a/hook.php +++ b/hook.php @@ -613,7 +613,7 @@ function plugin_example_get_events(NotificationTargetTicket $target) { function plugin_example_get_datas(NotificationTargetTicket $target) { - $target->datas['##ticket.example##'] = __("Example datas", 'example'); + $target->data['##ticket.example##'] = __("Example datas", 'example'); } diff --git a/inc/notificationtargetexample.class.php b/inc/notificationtargetexample.class.php index 2146842..c7702f3 100644 --- a/inc/notificationtargetexample.class.php +++ b/inc/notificationtargetexample.class.php @@ -41,6 +41,6 @@ class PluginExampleNotificationTargetExample extends NotificationTarget { function getDatasForTemplate($event, $options=array()) { global $DB, $CFG_GLPI; - $this->datas['##example.name##'] = __('Example', 'example'); + $this->data['##example.name##'] = __('Example', 'example'); } }