Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/units/categories/categories_event_handler.php
Show First 20 Lines • Show All 3020 Lines • ▼ Show 20 Line(s) | |||||
$sql = 'SELECT CategoryId, NamedParentPath | $sql = 'SELECT CategoryId, NamedParentPath | ||||
FROM ' . TABLE_PREFIX . 'Categories | FROM ' . TABLE_PREFIX . 'Categories | ||||
WHERE FriendlyURL = ' . $this->Conn->qstr(implode('/', $url_parts)); | WHERE FriendlyURL = ' . $this->Conn->qstr(implode('/', $url_parts)); | ||||
$friendly = $this->Conn->GetRow($sql); | $friendly = $this->Conn->GetRow($sql); | ||||
/** @var kRewriteUrlProcessor $rewrite_processor */ | /** @var kRewriteUrlProcessor $rewrite_processor */ | ||||
$rewrite_processor = $this->Application->recallObject('kRewriteUrlProcessor'); | $rewrite_processor = $this->Application->recallObject('kRewriteUrlProcessor'); | ||||
if ($friendly) { | if ( $friendly ) { | ||||
$vars['is_friendly_url'] = true; | |||||
$vars['m_cat_id'] = $friendly['CategoryId']; | $vars['m_cat_id'] = $friendly['CategoryId']; | ||||
$vars['t'] = preg_replace('/^Content\//i', '', $friendly['NamedParentPath']); | $vars['t'] = preg_replace('/^Content\//i', '', $friendly['NamedParentPath']); | ||||
while ($url_parts) { | while ($url_parts) { | ||||
$rewrite_processor->partParsed( array_shift($url_parts) ); | $rewrite_processor->partParsed( array_shift($url_parts) ); | ||||
} | } | ||||
return true; | return true; | ||||
▲ Show 20 Lines • Show All 118 Lines • Show Last 20 Lines |