X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=boot.php;h=19661805c26093ac7bc494a509d4fd8044cf960e;hb=e6b07d61cfa8c8b87e32ae36a93c554400f2e9e5;hp=04f36093bfffb38359a9a780999aef30e24c1eba;hpb=b44533e9fb685bb4b38073a90003d61911e1e24e;p=friendica.git diff --git a/boot.php b/boot.php index 04f36093bf..19661805c2 100755 --- a/boot.php +++ b/boot.php @@ -9,9 +9,9 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '2.3.1281' ); +define ( 'FRIENDICA_VERSION', '2.3.1291' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); -define ( 'DB_UPDATE_VERSION', 1131 ); +define ( 'DB_UPDATE_VERSION', 1133 ); define ( 'EOL', "
\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); @@ -135,6 +135,9 @@ define ( 'NOTIFY_PROFILE', 0x0040 ); define ( 'NOTIFY_TAGSELF', 0x0080 ); define ( 'NOTIFY_TAGSHARE', 0x0100 ); +define ( 'NOTIFY_SYSTEM', 0x8000 ); + + /** * various namespaces we may need to parse */ @@ -286,7 +289,12 @@ class App { startup(); - $this->scheme = ((isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'])) ? 'https' : 'http' ); + $this->scheme = 'http'; + if(x($_SERVER,'HTTPS') && $_SERVER['HTTPS']) + $this->scheme = 'https'; + elseif(x($_SERVER,'SERVER_PORT') && (intval($_SERVER['SERVER_PORT']) == 443)) + $this->scheme = 'https'; + if(x($_SERVER,'SERVER_NAME')) { $this->hostname = $_SERVER['SERVER_NAME']; @@ -380,7 +388,7 @@ class App { $scheme = $this->scheme; if((x($this->config,'system')) && (x($this->config['system'],'ssl_policy'))) { - if($this->config['system']['ssl_policy'] == SSL_POLICY_FULL) + if(intval($this->config['system']['ssl_policy']) === intval(SSL_POLICY_FULL)) $scheme = 'https'; // We need to populate the $ssl flag across the entire program before turning this on. @@ -708,15 +716,16 @@ function login($register = false, $hiddens=false) { $noid = get_config('system','no_openid'); + $dest_url = $a->get_baseurl(true) . '/' . $a->query_string; + if(local_user()) { $tpl = get_markup_template("logout.tpl"); } else { $tpl = get_markup_template("login.tpl"); - + $_SESSION['return_url'] = $a->query_string; } - $dest_url = $a->get_baseurl(true) . '/' . $a->query_string; $o .= replace_macros($tpl,array(