Revize 620
Přidáno uživatelem Michal Kliment před více než 14 roky(ů)
freenetis/trunk/kohana/application/hooks/err404.php | ||
---|---|---|
<?php
|
||
|
||
// This hook sets the locale.language and locale.lang config values
|
||
// based on the language found in the first segment of the URL.
|
||
|
||
|
||
/*
|
||
class Power {
|
||
public function show_error()
|
||
function e404()
|
||
{
|
||
echo "nenalezeno";
|
||
die();
|
||
}
|
||
}
|
||
*/
|
||
// call function site_lang from another same-name hook, important for right locale
|
||
site_lang();
|
||
|
||
function show_404($page = FALSE, $template = FALSE)
|
||
{
|
||
url::redirect(url_lang::base().'errors/e404');
|
||
die();
|
||
$controller = new Errors_Controller();
|
||
$controller->e404();
|
||
die();
|
||
}
|
||
|
||
Event::replace('system.404', array('Kohana', 'show_404'), 'show_404');
|
||
// */
|
||
?>
|
||
Event::replace('system.404', array('Kohana', 'show_404'), 'e404');
|
||
|
||
?>
|
freenetis/trunk/kohana/application/controllers/errors.php | ||
---|---|---|
$this->error(5);
|
||
}
|
||
|
||
}
|
||
}
|
Také k dispozici: Unified diff
Vylepseno odchytavani chyby 404.