Changeset View
Changeset View
Standalone View
Standalone View
core/kernel/managers/rewrite_url_processor.php
Show First 20 Lines • Show All 694 Lines • ▼ Show 20 Line(s) | |||||
* @return bool | * @return bool | ||||
*/ | */ | ||||
protected function _parsePhysicalTemplate($url_parts, &$vars) | protected function _parsePhysicalTemplate($url_parts, &$vars) | ||||
{ | { | ||||
if ( !$url_parts ) { | if ( !$url_parts ) { | ||||
return false; | return false; | ||||
} | } | ||||
/** @var kThemesHelper $themes_helper */ | |||||
$themes_helper = $this->Application->recallObject('ThemesHelper'); | $themes_helper = $this->Application->recallObject('ThemesHelper'); | ||||
/* @var $themes_helper kThemesHelper */ | |||||
do { | do { | ||||
$index_added = false; | $index_added = false; | ||||
$template_path = implode('/', $url_parts); | $template_path = implode('/', $url_parts); | ||||
$template_found = $themes_helper->getTemplateId($template_path, $vars['m_theme']); | $template_found = $themes_helper->getTemplateId($template_path, $vars['m_theme']); | ||||
if ( !$template_found ) { | if ( !$template_found ) { | ||||
$index_added = true; | $index_added = true; | ||||
Show All 31 Lines | |||||
* @param bool $keep_events | * @param bool $keep_events | ||||
* @return Array | * @return Array | ||||
* @access public | * @access public | ||||
*/ | */ | ||||
public function getProcessedParams($prefix_special, &$params, $keep_events) | public function getProcessedParams($prefix_special, &$params, $keep_events) | ||||
{ | { | ||||
list ($prefix) = explode('.', $prefix_special); | list ($prefix) = explode('.', $prefix_special); | ||||
/** @var Array $query_vars */ | |||||
$query_vars = $this->Application->getUnitOption($prefix, 'QueryString', Array ()); | $query_vars = $this->Application->getUnitOption($prefix, 'QueryString', Array ()); | ||||
Lint: CodingStandard.Array.Array.SpaceAfterKeyword: There must be no space between the Array keyword and the opening parenthesis | |||||
PHP keywords must be lowercase; expected "array" but found "Array" Lint: Generic.PHP.LowerCaseKeyword.Found: PHP keywords must be lowercase; expected "array" but found "Array" | |||||
/* @var $query_vars Array */ | |||||
if ( !$query_vars ) { | if ( !$query_vars ) { | ||||
// given prefix doesn't use "env" variable to pass it's data | // given prefix doesn't use "env" variable to pass it's data | ||||
return false; | return false; | ||||
} | } | ||||
$event_key = array_search('event', $query_vars); | $event_key = array_search('event', $query_vars); | ||||
if ( $event_key ) { | if ( $event_key ) { | ||||
▲ Show 20 Lines • Show All 74 Lines • ▼ Show 20 Line(s) | |||||
ON ccd.ResourceId = c.ResourceId | ON ccd.ResourceId = c.ResourceId | ||||
WHERE c.CategoryId IN (' . $parent_path . ') AND ccd.l' . $primary_lang . '_cust_' . $item_template_field_id . ' != \'\' | WHERE c.CategoryId IN (' . $parent_path . ') AND ccd.l' . $primary_lang . '_cust_' . $item_template_field_id . ' != \'\' | ||||
ORDER BY FIND_IN_SET(c.CategoryId, ' . $this->Conn->qstr($parent_path) . ') DESC'; | ORDER BY FIND_IN_SET(c.CategoryId, ' . $this->Conn->qstr($parent_path) . ') DESC'; | ||||
$item_template = $this->Conn->GetOne($query); | $item_template = $this->Conn->GetOne($query); | ||||
if ( !isset($this->_templateAliases) ) { | if ( !isset($this->_templateAliases) ) { | ||||
// when empty url OR mod-rewrite disabled | // when empty url OR mod-rewrite disabled | ||||
/** @var kThemesHelper $themes_helper */ | |||||
$themes_helper = $this->Application->recallObject('ThemesHelper'); | $themes_helper = $this->Application->recallObject('ThemesHelper'); | ||||
/* @var $themes_helper kThemesHelper */ | |||||
$sql = 'SELECT TemplateAliases | $sql = 'SELECT TemplateAliases | ||||
FROM ' . TABLE_PREFIX . 'Themes | FROM ' . TABLE_PREFIX . 'Themes | ||||
WHERE ThemeId = ' . (int)$themes_helper->getCurrentThemeId(); | WHERE ThemeId = ' . (int)$themes_helper->getCurrentThemeId(); | ||||
$template_aliases = $this->Conn->GetOne($sql); | $template_aliases = $this->Conn->GetOne($sql); | ||||
$this->_templateAliases = $template_aliases ? unserialize($template_aliases) : Array (); | $this->_templateAliases = $template_aliases ? unserialize($template_aliases) : Array (); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 244 Lines • Show Last 20 Lines |
There must be no space between the Array keyword and the opening parenthesis