Index: trunk/core/kernel/application.php =================================================================== diff -u -r3358 -r3359 --- trunk/core/kernel/application.php (.../application.php) (revision 3358) +++ trunk/core/kernel/application.php (.../application.php) (revision 3359) @@ -212,7 +212,7 @@ $this->Phrases->Init('phrases'); $this->VerifyThemeId(); } - + if( !$this->RecallVar('UserGroups') ) { $session =& $this->recallObject('Session'); @@ -225,7 +225,7 @@ if( !$this->RecallVar('curr_iso') ) $this->StoreVar('curr_iso', $this->GetPrimaryCurrency() ); $this->SetVar('visits_id', $this->RecallVar('visit_id') ); - + $language =& $this->recallObject( 'lang.current', null, Array('live_table' => true) ); $this->ValidateLogin(); // TODO: write that method @@ -437,7 +437,7 @@ function registerModuleConstants() { if (!$this->ModuleInfo) return false; - + foreach($this->ModuleInfo as $module_name => $module_info) { $module_path = '/'.$module_info['Path']; @@ -809,7 +809,6 @@ $session->SetMode(smGET_ONLY); } } - unset($params['__SSL__']); if (getArrayValue($params, 'opener') == 'u') { $opener_stack=$this->RecallVar('opener_stack'); @@ -842,8 +841,7 @@ unset($params['anchor']); } - $allow_rewriting = !$this->ConfigValue('UseModRewriteWithSSL') && ($ssl || (PROTOCOL == 'https://')) ? false : true; - if ($this->RewriteURLs() && $allow_rewriting) + if ($this->RewriteURLs($ssl)) { $session =& $this->recallObject('Session'); if( $session->NeedQueryString() ) $params['sid'] = $this->GetSID(); @@ -877,6 +875,10 @@ unset($params['__URLENCODE__']); } + if (isset($params['__SSL__'])) { + unset($params['__SSL__']); + } + $pass = str_replace('all', trim($this->GetVar('passed'), ','), $pass); if(strlen($pass) > 0) @@ -971,7 +973,8 @@ function BuildEnv($t, $params, $pass='all', $pass_events=false, $env_var=true) { $session =& $this->recallObject('Session'); - $sid = $session->NeedQueryString() && !$this->RewriteURLs() ? $this->GetSID() : ''; + $ssl = isset($params['__SSL__']) ? $params['__SSL__'] : 0; + $sid = $session->NeedQueryString() && !$this->RewriteURLs($ssl) ? $this->GetSID() : ''; if( getArrayValue($params,'admin') == 1 ) $sid = $this->GetSID(); $ret = ''; @@ -986,6 +989,10 @@ unset($params['__URLENCODE__']); } + if (isset($params['__SSL__'])) { + unset($params['__SSL__']); + } + $pass = trim( str_replace('all', $this->GetVar('passed'), $pass), ','); if(strlen($pass) > 0) @@ -1085,7 +1092,7 @@ } } } - + $session =& $this->recallObject('Session'); $session->SaveData(); $this->SaveBlocksCache(); @@ -1310,9 +1317,10 @@ * * @return bool */ - function RewriteURLs() + function RewriteURLs($ssl = false) { - return constOn('MOD_REWRITE'); + $allow_rewriting = !$this->ConfigValue('UseModRewriteWithSSL') && ($ssl || (PROTOCOL == 'https://')) ? false : true; + return constOn('MOD_REWRITE') && $allow_rewriting; } /** @@ -1597,7 +1605,7 @@ $visit->SetDBField($field, $value); $visit->Update(); } - + /** * Allows to check if in-portal is installed * @@ -1610,4 +1618,4 @@ } -?> +?> \ No newline at end of file