X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fstatusnet.php;h=648369ec4482ebf9f1f347aa382d12b13c9d2eee;hb=3904ab9983942c30ae7209c8c6a3426359a51770;hp=2e2359c287f07a8fd8ec1e1977e9be250a10b8d5;hpb=04ca706601a2a3b556cc52fa21b61fcd842c4e87;p=quix0rs-gnu-social.git diff --git a/lib/statusnet.php b/lib/statusnet.php index 2e2359c287..648369ec44 100644 --- a/lib/statusnet.php +++ b/lib/statusnet.php @@ -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 !empty($_SERVER['HTTPS']); + if(empty($_SERVER['HTTPS'])) { + return false; + } else { + return $_SERVER['HTTPS'] !== 'off'; + } } }