]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/statusnet.php
Merge remote branch 'statusnet/0.9.x' into 1.0.x
[quix0rs-gnu-social.git] / lib / statusnet.php
index 39f90a5069dffb7a3cd67ff2bba3cd9e5c4ab28d..3d018f4e211b54e0f0ebc00d236fbefcf04df55d 100644 (file)
@@ -169,7 +169,6 @@ class StatusNet
         return $sites;
     }
 
-
     /**
      * Fire initialization events for all instantiated plugins.
      */
@@ -225,7 +224,7 @@ class StatusNet
     {
         return self::$is_api;
     }
-    
+
     public function setApi($mode)
     {
         self::$is_api = $mode;
@@ -387,6 +386,18 @@ class StatusNet
             }
         }
     }
+
+    /**
+     * Are we running from the web with HTTPS?
+     *
+     * @return boolean true if we're running with HTTPS; else false
+     */
+
+    static function isHTTPS()
+    {
+        // There are some exceptions to this; add them here!
+        return $_SERVER['HTTPS'];
+    }
 }
 
 class NoConfigException extends Exception