From: Chuck Scott Date: Tue, 27 Feb 2018 19:21:18 +0000 (-0500) Subject: Now not adding http:// to empty URLs. X-Git-Tag: v1.6.78^2~5 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=079b140458ec17d4f6129b6332f88c21a3a4175b;p=WP-Plugins%2Fglm-member-db-events.git Now not adding http:// to empty URLs. --- 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) {