Use https if we have https
authorMichael J. Rubinsky <mrubinsk@horde.org>
Sun, 15 Feb 2009 20:42:25 +0000 (15:42 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Sun, 15 Feb 2009 20:42:25 +0000 (15:42 -0500)
framework/Service_Facebook/lib/Horde/Service/Facebook.php

index 16de1bb..1047a7b 100644 (file)
@@ -259,7 +259,7 @@ class Horde_Service_Facebook
 
     public static function current_url()
     {
-        return 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
+        return (!empty($_SERVER['HTTP']) ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
     }
 
     /**