]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
add static method StatusNet::isHTTPS()
authorEvan Prodromou <evan@status.net>
Thu, 14 Oct 2010 04:16:23 +0000 (00:16 -0400)
committerEvan Prodromou <evan@status.net>
Thu, 14 Oct 2010 04:16:23 +0000 (00:16 -0400)
lib/statusnet.php

index 7cb831696bc02ac512a69f6190469242227371c4..301994508de630401b1645f010a6e91bfc77dc92 100644 (file)
@@ -169,7 +169,6 @@ class StatusNet
         return $sites;
     }
 
-
     /**
      * Fire initialization events for all instantiated plugins.
      */
@@ -220,7 +219,7 @@ class StatusNet
     {
         return self::$is_api;
     }
-    
+
     public function setApi($mode)
     {
         self::$is_api = $mode;
@@ -368,6 +367,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