From 079b140458ec17d4f6129b6332f88c21a3a4175b Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Tue, 27 Feb 2018 14:21:18 -0500 Subject: [PATCH] Now not adding http:// to empty URLs. --- classes/data/dataEvents.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/classes/data/dataEvents.php b/classes/data/dataEvents.php index 382ab5c..4aebbc4 100644 --- a/classes/data/dataEvents.php +++ b/classes/data/dataEvents.php @@ -500,9 +500,15 @@ class GlmDataEvents extends GlmDataAbstract { // Check that URLs have http:// in front of them. - if (isset($r['url']) && strtolower(substr($r['url'],0,4)) != 'http') { + if (isset($r['url']) && strlen(trim($r['url'])) > 0 && strtolower(substr($r['url'],0,4)) != 'http') { $r['url'] = 'http://'.$r['url']; } + if (isset($r['ticket_url']) && strlen(trim($r['ticket_url'])) > 0 && strtolower(substr($r['ticket_url'],0,4)) != 'http') { + $r['ticket_url'] = 'http://'.$r['ticket_url']; + } + if (isset($r['registration_url']) && strlen(trim($r['registration_url'])) > 0 && strtolower(substr($r['registration_url'],0,4)) != 'http') { + $r['registration_url'] = 'http://'.$r['registration_url']; + } // Get Member Category data for this entry if ($this->postCategories) { -- 2.17.1