Index: branches/5.2.x/core/kernel/managers/url_manager.php =================================================================== diff -u -N -r15362 -r15389 --- branches/5.2.x/core/kernel/managers/url_manager.php (.../url_manager.php) (revision 15362) +++ branches/5.2.x/core/kernel/managers/url_manager.php (.../url_manager.php) (revision 15389) @@ -1,6 +1,6 @@ getPassThroughVariables($params), $params); + $session = $this->Application->recallObject('Session'); + + if ( $session->NeedQueryString() && !$force_no_sid ) { + $params['sid'] = $this->Application->GetSID(); + } + if ( $force_rewrite || ($this->Application->RewriteURLs($ssl) && $rewrite) ) { if ( !$this->rewriteReady ) { $this->initRewrite(); } - $session = $this->Application->recallObject('Session'); - - if ( $session->NeedQueryString() && !$force_no_sid ) { - $params['sid'] = $this->Application->GetSID(); - } - $url = $this->rewrite->build($t, $params, $pass, $pass_events); } else {