PluginProbe
VikBooking Hotel Booking Engine & PMS / 1.8.16
VikBooking Hotel Booking Engine & PMS v1.8.16
1.8.16 1.8.15 1.8.14 1.8.13 1.8.12 1.8.11 1.8.10 1.8.9 1.8.6 1.8.7 1.8.8 trunk 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 All 37 releases
← All changes | admin/helpers/src/notification/display/message.php +8 -4 1.6.4 → 1.8.16 View file →
@@ -32,8 +32,10 @@
32 32 * Composes an object with the necessary properties to display
33 33 * the notification in the browser.
34 34 *
35 35 * @return null|object the notification display data payload.
36 + *
37 + * @throws Exception
36 38 */
37 39 public function getData()
38 40 {
39 41 $booking_id = (int)$this->get('idorder', 0);
@@ -67,12 +69,9 @@
67 69 $notif_data->title = $notif_title;
68 70 $notif_data->message = $this->get('content', '');
69 71 $notif_data->icon = $notif_icon;
70 72 $notif_data->onclick = 'VBOCore.handleDisplayWidgetNotification';
71 - $notif_data->gotourl = 'index.php?option=com_vikbooking&task=editorder&cid[]=' . $booking_id;
72 - if (VBOPlatformDetection::isWordPress()) {
73 - $notif_data->gotourl = str_replace('index.php', 'admin.php', $notif_data->gotourl);
74 - }
73 + $notif_data->gotourl = VBOFactory::getPlatform()->getUri()->admin("index.php?option=com_vikbooking&task=editorder&cid[]={$booking_id}", false);
75 74
76 75 // set additional properties to the notification payload related to the guest message
77 76 $notif_data->widget_id = 'guest_messages';
78 77 $notif_data->channel = $this->get('channel', null);
@@ -79,8 +78,13 @@
79 78 $notif_data->id_order = $booking_id;
80 79 $notif_data->id_customer = $this->get('id_customer', null);
81 80 $notif_data->id_message = $this->get('id_message', null);
82 81 $notif_data->id_thread = $this->get('id_thread', null);
82 + // set additional data options to ensure the conversation will be found
83 + $notif_data->_options = [
84 + '_web' => 1,
85 + 'bid' => $booking_id,
86 + ];
83 87
84 88 return $notif_data;
85 89 }
86 90