Changeset View
Changeset View
Standalone View
Standalone View
core/kernel/managers/url_manager.php
Show First 20 Lines • Show All 125 Lines • ▼ Show 20 Line(s) | |||||
$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 ) { | ||||
Lint: Generic.PHP.LowerCaseConstant.Found: TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL" | |||||
No blank line found before "if" control structure Lint: CodingStandard.WhiteSpace.ControlStructureSpacing.NoLineBeforeOpen: No blank line found before "if" control structure | |||||
/** @var Session $session */ | |||||
$session = $this->Application->recallObject('Session'); | $session = $this->Application->recallObject('Session'); | ||||
/* @var $session Session */ | |||||
$target_url = rtrim($this->Application->BaseURL('', $ssl, false), '/'); | $target_url = rtrim($this->Application->BaseURL('', $ssl, false), '/'); | ||||
$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 ) { | ||||
// when SSL<->NON-SSL redirect to different domain pass SID in url | // when SSL<->NON-SSL redirect to different domain pass SID in url | ||||
$session->SetMode(Session::smGET_ONLY); | $session->SetMode(Session::smGET_ONLY); | ||||
▲ Show 20 Lines • Show All 76 Lines • ▼ Show 20 Line(s) | |||||
* | * | ||||
* @param string $prefix | * @param string $prefix | ||||
* @param Array $params | * @param Array $params | ||||
* @return bool|string | * @return bool|string | ||||
* @access protected | * @access protected | ||||
*/ | */ | ||||
protected function processPopupClose($prefix = '', $params = Array ()) | protected function processPopupClose($prefix = '', $params = Array ()) | ||||
{ | { | ||||
/** @var kOpenerStack $opener_stack */ | |||||
$opener_stack = $this->Application->makeClass('kOpenerStack'); | $opener_stack = $this->Application->makeClass('kOpenerStack'); | ||||
/* @var $opener_stack kOpenerStack */ | |||||
if ( $opener_stack->isEmpty() ) { | if ( $opener_stack->isEmpty() ) { | ||||
return false; | return false; | ||||
} | } | ||||
$ssl = isset($params['__SSL__']) ? $params['__SSL__'] : null; | $ssl = isset($params['__SSL__']) ? $params['__SSL__'] : null; | ||||
list($index_file, $env) = explode('|', $opener_stack->get(kOpenerStack::LAST_ELEMENT, true)); | list($index_file, $env) = explode('|', $opener_stack->get(kOpenerStack::LAST_ELEMENT, true)); | ||||
$ret = $this->Application->BaseURL($prefix, $ssl) . $index_file . '?' . ENV_VAR_NAME . '=' . $env; | $ret = $this->Application->BaseURL($prefix, $ssl) . $index_file . '?' . ENV_VAR_NAME . '=' . $env; | ||||
▲ Show 20 Lines • Show All 175 Lines • ▼ Show 20 Line(s) | |||||
/** | /** | ||||
* Loads template mapping for Front-End | * Loads template mapping for Front-End | ||||
* | * | ||||
* @return void | * @return void | ||||
* @access public | * @access public | ||||
*/ | */ | ||||
public function LoadStructureTemplateMapping() | public function LoadStructureTemplateMapping() | ||||
{ | { | ||||
if (!$this->Application->isAdmin) { | if (!$this->Application->isAdmin) { | ||||
Expected 1 spaces before "if" closing bracket; 0 found Lint: CodingStandard.WhiteSpace.ControlStructureSpacing.SpaceBeforeCloseBrace: Expected 1 spaces before "if" closing bracket; 0 found | |||||
Expected 1 spaces after "if" opening bracket; 0 found Lint: CodingStandard.WhiteSpace.ControlStructureSpacing.SpacingAfterOpenBrace: Expected 1 spaces after "if" opening bracket; 0 found | |||||
/** @var CategoryHelper $category_helper */ | |||||
$category_helper = $this->Application->recallObject('CategoryHelper'); | $category_helper = $this->Application->recallObject('CategoryHelper'); | ||||
/* @var $category_helper CategoryHelper */ | |||||
$this->structureTemplateMapping = $category_helper->getTemplateMapping(); | $this->structureTemplateMapping = $category_helper->getTemplateMapping(); | ||||
} | } | ||||
} | } | ||||
/** | /** | ||||
* Removes tpl part from template name + resolved template ID to name | * Removes tpl part from template name + resolved template ID to name | ||||
* | * | ||||
Show All 39 Lines |
TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"