From 4707c1a9938b95b5e9c80aad6e4579bb1027473b Mon Sep 17 00:00:00 2001 From: colemanw Date: Sat, 3 Dec 2022 18:55:24 -0500 Subject: [PATCH] Update hook_civicrm_tabset for forward-compat with 5.57 This makes the hook both forward and backward compatible with current and future versions of core and the ContactLayout extension. --- booking.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/booking.php b/booking.php index c6d62fa4..4e80903a 100755 --- a/booking.php +++ b/booking.php @@ -11,9 +11,9 @@ * Display a booking tab listing booking belong to that contact. */ function booking_civicrm_tabset($tabsetName, &$tabs, $context) { - if ($tabsetName === 'civicrm/contact/view' && !empty($context['contact_id'])) { + if ($tabsetName === 'civicrm/contact/view') { $cid = $context['contact_id']; - $count = CRM_Booking_BAO_Booking::getBookingContactCount($cid); //TODO Count number of booking and show on the tab + $count = CRM_Booking_BAO_Booking::getBookingContactCount($cid); $tab = [ 'id' => 'booking', 'count' => $count,