mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-07-08 01:14:24 +03:00
52 lines
1.3 KiB
PHP
52 lines
1.3 KiB
PHP
<?
|
||
/*-------------------------------------------------------
|
||
*
|
||
* LiveStreet Engine Social Networking
|
||
* Copyright © 2008 Mzhelskiy Maxim
|
||
*
|
||
*--------------------------------------------------------
|
||
*
|
||
* Official site: www.livestreet.ru
|
||
* Contact e-mail: rus.engine@gmail.com
|
||
*
|
||
* GNU General Public License, version 2:
|
||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||
*
|
||
---------------------------------------------------------
|
||
*/
|
||
|
||
/**
|
||
* Класс обработки УРЛа вида /error/ т.е. ошибок
|
||
*
|
||
*/
|
||
class ActionError extends Action {
|
||
/**
|
||
* Инициализация экшена
|
||
*
|
||
*/
|
||
public function Init() {
|
||
$this->SetDefaultEvent('index');
|
||
}
|
||
/**
|
||
* Регистрируем евент
|
||
*
|
||
*/
|
||
protected function RegisterEvent() {
|
||
$this->AddEvent('index','EventError');
|
||
}
|
||
/**
|
||
* То что делаем при выполнении евента, т.е. ничего :) просто выводим шаблон
|
||
*
|
||
*/
|
||
protected function EventError() {
|
||
/**
|
||
* Если у первой ошибки заголовок 404 значит нажно в хидере послать браузеру HTTP/1.1 404 Not Found
|
||
*/
|
||
$aError=$this->Message_GetError();
|
||
if ($aError[0]['title']=='404') {
|
||
header("HTTP/1.1 404 Not Found");
|
||
}
|
||
$this->Viewer_AddHtmlTitle($this->Lang_Get('error'));
|
||
}
|
||
}
|
||
?>
|