]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/statusnet.php
mail paths for docfile
[quix0rs-gnu-social.git] / lib / statusnet.php
index 3d018f4e211b54e0f0ebc00d236fbefcf04df55d..648369ec4482ebf9f1f347aa382d12b13c9d2eee 100644 (file)
@@ -31,6 +31,7 @@ class StatusNet
 {
     protected static $have_config;
     protected static $is_api;
+    protected static $is_ajax;
     protected static $plugins = array();
 
     /**
@@ -230,6 +231,16 @@ class StatusNet
         self::$is_api = $mode;
     }
 
+    public function isAjax()
+    {
+        return self::$is_ajax;
+    }
+
+    public function setAjax($mode)
+    {
+        self::$is_ajax = $mode;
+    }
+
     /**
      * Build default configuration array
      * @return array
@@ -245,7 +256,7 @@ class StatusNet
      * Establish default configuration based on given or default server and path
      * Sets global $_server, $_path, and $config
      */
-    protected static function initDefaults($server, $path)
+    public static function initDefaults($server, $path)
     {
         global $_server, $_path, $config;
 
@@ -396,7 +407,11 @@ class StatusNet
     static function isHTTPS()
     {
         // There are some exceptions to this; add them here!
-        return $_SERVER['HTTPS'];
+        if(empty($_SERVER['HTTPS'])) {
+            return false;
+        } else {
+            return $_SERVER['HTTPS'] !== 'off';
+        }
     }
 }