]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/statusnet.php
define Reply::pkeyGet()
[quix0rs-gnu-social.git] / lib / statusnet.php
index d94d856c9a01f7a9a67e321c11b3a0f9f43bd29c..73185b16926a8304e6424000e4ec778cafccda57 100644 (file)
@@ -31,6 +31,7 @@ class StatusNet
 {
     protected static $have_config;
     protected static $is_api;
+    protected static $is_ajax;
     protected static $plugins = array();
 
     /**
@@ -107,6 +108,8 @@ class StatusNet
      */
     public static function init($server=null, $path=null, $conffile=null)
     {
+        Router::clear();
+
         StatusNet::initDefaults($server, $path);
         StatusNet::loadConfigFile($conffile);
 
@@ -230,6 +233,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
@@ -283,10 +296,6 @@ class StatusNet
 
         $config['db'] = $default['db'];
 
-        // Backward compatibility
-
-        $config['site']['design'] =& $config['design'];
-
         if (function_exists('date_default_timezone_set')) {
             /* Work internally in UTC */
             date_default_timezone_set('UTC');
@@ -396,7 +405,11 @@ class StatusNet
     static function isHTTPS()
     {
         // There are some exceptions to this; add them here!
-        return !empty($_SERVER['HTTPS']);
+        if(empty($_SERVER['HTTPS'])) {
+            return false;
+        } else {
+            return $_SERVER['HTTPS'] !== 'off';
+        }
     }
 }