Added code to post processing to ensure http:// is always at the beginning of URLs
authorChuck Scott <cscott@gaslightmedia.com>
Mon, 26 Feb 2018 18:07:53 +0000 (13:07 -0500)
committerChuck Scott <cscott@gaslightmedia.com>
Mon, 26 Feb 2018 18:07:53 +0000 (13:07 -0500)
classes/data/dataEvents.php

index 0ac06e5..aa45d50 100644 (file)
@@ -499,6 +499,11 @@ class GlmDataEvents extends GlmDataAbstract
     public function entryPostProcessing($r, $a)
     {
 
+        // Check that URLs have http:// in front of them.
+        if (strtolower(substr($r['url'],0,4)) != 'http') {
+            $r['url'] = 'http://'.$r['url'];
+        }
+        
         // Get Member Category data for this entry
         if ($this->postCategories) {
             $sql = "