Changeset View
Changeset View
Standalone View
Standalone View
core/kernel/managers/url_manager.php
Show First 20 Lines • Show All 486 Lines • ▼ Show 20 Line(s) | |||||
* @return array | * @return array | ||||
*/ | */ | ||||
public function prepare404($theme_id = null) | public function prepare404($theme_id = null) | ||||
{ | { | ||||
if ( !isset($theme_id) ) { | if ( !isset($theme_id) ) { | ||||
$theme_id = $this->Application->GetVar('m_theme'); | $theme_id = $this->Application->GetVar('m_theme'); | ||||
} | } | ||||
$not_found = $this->Application->ConfigValue('ErrorTemplate'); | $not_found = $this->Application->ConfigValue('NotFoundErrorTemplate'); | ||||
$vars['t'] = $not_found ? $not_found : 'error_notfound'; | $vars['t'] = $not_found ? $not_found : 'error_notfound'; | ||||
$themes_helper = $this->Application->recallObject('ThemesHelper'); | $themes_helper = $this->Application->recallObject('ThemesHelper'); | ||||
/* @var $themes_helper kThemesHelper */ | /* @var $themes_helper kThemesHelper */ | ||||
$vars['m_cat_id'] = $themes_helper->getPageByTemplate($vars['t'], $theme_id); | $vars['m_cat_id'] = $themes_helper->getPageByTemplate($vars['t'], $theme_id); | ||||
header('HTTP/1.0 404 Not Found'); | header('HTTP/1.0 404 Not Found'); | ||||
Show All 15 Lines | |||||
$this->Application->SetVar($var_name, $var_value); | $this->Application->SetVar($var_name, $var_value); | ||||
} | } | ||||
// ensure parser is available (e.g. 404 page requested from event) | // ensure parser is available (e.g. 404 page requested from event) | ||||
$this->Application->QuickRun(); | $this->Application->QuickRun(); | ||||
$this->Application->Done(); | $this->Application->Done(); | ||||
exit; | exit; | ||||
} | } | ||||
} | } | ||||
No newline at end of file |