Changeset View
Changeset View
Standalone View
Standalone View
core/kernel/managers/url_manager.php
Show First 20 Lines • Show All 124 Lines • ▼ Show 20 Line(s) | |||||
if ( $this->Application->isAdmin && $prefix == '_FRONT_END_' ) { | if ( $this->Application->isAdmin && $prefix == '_FRONT_END_' ) { | ||||
$prefix = ''; | $prefix = ''; | ||||
} | } | ||||
if ( isset($params['_auto_prefix_']) ) { | if ( isset($params['_auto_prefix_']) ) { | ||||
unset($params['_auto_prefix_']); // this is parser-related param, do not need to pass it here | unset($params['_auto_prefix_']); // this is parser-related param, do not need to pass it here | ||||
} | } | ||||
$ssl = isset($params['__SSL__']) ? $params['__SSL__'] : NULL; | $ssl = isset($params['__SSL__']) ? $params['__SSL__'] : null; | ||||
if ( $ssl !== NULL ) { | |||||
if ( $ssl !== null && $this->Application->isWebRequest() ) { | |||||
$session = $this->Application->recallObject('Session'); | $session = $this->Application->recallObject('Session'); | ||||
/* @var $session Session */ | /* @var $session Session */ | ||||
$target_url = rtrim($this->Application->BaseURL('', $ssl), '/'); | $target_url = rtrim($this->Application->BaseURL('', $ssl), '/'); | ||||
$cookie_url = trim($session->CookieDomain . $session->CookiePath, '/.'); | $cookie_url = trim($session->CookieDomain . $session->CookiePath, '/.'); | ||||
// set session to GET_ONLY, to pass sid only if sid is REAL AND session is set | // set session to GET_ONLY, to pass sid only if sid is REAL AND session is set | ||||
if ( !preg_match('#' . preg_quote($cookie_url) . '#', $target_url) && $session->SessionSet ) { | if ( !preg_match('#' . preg_quote($cookie_url) . '#', $target_url) && $session->SessionSet ) { | ||||
▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Line(s) | |||||
if ( isset($params['domain']) ) { | if ( isset($params['domain']) ) { | ||||
$domain = $params['domain']; | $domain = $params['domain']; | ||||
unset($params['domain']); | unset($params['domain']); | ||||
} | } | ||||
// append pass through variables to each link to be build | // append pass through variables to each link to be build | ||||
$params = array_merge($this->getPassThroughVariables($params), $params); | $params = array_merge($this->getPassThroughVariables($params), $params); | ||||
if ( $this->Application->isWebRequest() ) { | |||||
$session = $this->Application->recallObject('Session'); | $session = $this->Application->recallObject('Session'); | ||||
if ( $session->NeedQueryString() && !$force_no_sid ) { | if ( $session->NeedQueryString() && !$force_no_sid ) { | ||||
$params['sid'] = $this->Application->GetSID(); | $params['sid'] = $this->Application->GetSID(); | ||||
} | } | ||||
} | |||||
if ( $force_rewrite || ($this->Application->RewriteURLs($ssl) && $rewrite) ) { | if ( $force_rewrite || ($this->Application->RewriteURLs($ssl) && $rewrite) ) { | ||||
if ( !$this->rewriteReady ) { | if ( !$this->rewriteReady ) { | ||||
$this->initRewrite(); | $this->initRewrite(); | ||||
} | } | ||||
$url = $this->rewrite->build($t, $params, $pass, $pass_events); | $url = $this->rewrite->build($t, $params, $pass, $pass_events); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 286 Lines • Show Last 20 Lines |