diff options
author | Evan Prodromou <evan@status.net> | 2010-10-14 00:16:23 -0400 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-10-14 00:16:23 -0400 |
commit | cef10c7167dd9c6183b52a09dc9baefbf0b433cc (patch) | |
tree | 8cb589072db2da853de7c723b3ed71d06214b011 /lib/statusnet.php | |
parent | 76038fe20c7ebd732ffbc659827ab812ee5a4b6e (diff) |
add static method StatusNet::isHTTPS()
Diffstat (limited to 'lib/statusnet.php')
-rw-r--r-- | lib/statusnet.php | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/statusnet.php b/lib/statusnet.php index 7cb831696..301994508 100644 --- a/lib/statusnet.php +++ b/lib/statusnet.php @@ -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 |