From 0b50814cf446ace57823a7904b0d112db0e0cefd Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Wed, 8 Apr 2020 10:57:31 +0200 Subject: [PATCH] Appointment location could be empty, use the company name instead. --- application/libraries/Google_sync.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/libraries/Google_sync.php b/application/libraries/Google_sync.php index 7fb993c0..1e8ec9c0 100644 --- a/application/libraries/Google_sync.php +++ b/application/libraries/Google_sync.php @@ -143,7 +143,7 @@ class Google_Sync { $event = new Google_Event(); $event->setSummary(($service != NULL) ? $service['name'] : 'Unavailable'); $event->setDescription($appointment['notes']); - $event->setLocation($appointment['location']); + $event->setLocation(isset($appointment['location']) ? $appointment['location'] : $company_settings['company_name']); $start = new Google_EventDateTime(); $start->setDateTime(date3339(strtotime($appointment['start_datetime']))); @@ -201,7 +201,7 @@ class Google_Sync { $event->setSummary($service['name']); $event->setDescription($appointment['notes']); - $event->setLocation($appointment['location']); + $event->setLocation(isset($appointment['location']) ? $appointment['location'] : $company_settings['company_name']); $start = new Google_EventDateTime(); $start->setDateTime(date3339(strtotime($appointment['start_datetime'])));