mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-17 07:10:48 +03:00
Вызовы хуков в init и shutdown action`ов
This commit is contained in:
parent
a19874356c
commit
ef584642d5
|
@ -28,12 +28,14 @@ class ActionAdmin extends Action {
|
|||
*/
|
||||
protected $sMenuHeadItemSelect='admin';
|
||||
|
||||
public function Init() {
|
||||
public function Init() {
|
||||
$this->Hook_Run('action_init_admin_before');
|
||||
if(!$this->User_IsAuthorization() or !$oUserCurrent=$this->User_GetUserCurrent() or !$oUserCurrent->isAdministrator()) {
|
||||
return parent::EventNotFound();
|
||||
}
|
||||
|
||||
$this->oUserCurrent=$oUserCurrent;
|
||||
$this->Hook_Run('action_init_admin_after');
|
||||
}
|
||||
|
||||
protected function RegisterEvent() {
|
||||
|
@ -118,7 +120,8 @@ class ActionAdmin extends Action {
|
|||
/**
|
||||
* Загружаем в шаблон необходимые переменные
|
||||
*/
|
||||
$this->Viewer_Assign('sMenuHeadItemSelect',$this->sMenuHeadItemSelect);
|
||||
$this->Viewer_Assign('sMenuHeadItemSelect',$this->sMenuHeadItemSelect);
|
||||
$this->Hook_Run('action_shutdown_admin');
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -86,7 +86,8 @@ class ActionBlog extends Action {
|
|||
* Инизиализация экшена
|
||||
*
|
||||
*/
|
||||
public function Init() {
|
||||
public function Init() {
|
||||
$this->Hook_Run('action_init_blog_before');
|
||||
/**
|
||||
* Устанавливаем евент по дефолту, т.е. будем показывать хорошие топики из коллективных блогов
|
||||
*/
|
||||
|
@ -104,6 +105,8 @@ class ActionBlog extends Action {
|
|||
$this->iCountTopicsPersonalNew=$this->Topic_GetCountTopicsPersonalNew();
|
||||
$this->iCountTopicsBlogNew=$this->iCountTopicsCollectiveNew;
|
||||
$this->iCountTopicsNew=$this->iCountTopicsCollectiveNew+$this->iCountTopicsPersonalNew;
|
||||
|
||||
$this->Hook_Run('action_init_blog_after');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -180,7 +183,7 @@ class ActionBlog extends Action {
|
|||
/**
|
||||
* Парсим текст на предмет разных ХТМЛ тегов
|
||||
*/
|
||||
$sText=$this->Text_Parser(getRequest('blog_description'));
|
||||
$sText=$this->Text_Parser(getRequest('blog_description'));
|
||||
$oBlog->setDescription($sText);
|
||||
$oBlog->setType(getRequest('blog_type'));
|
||||
$oBlog->setDateAdd(date("Y-m-d H:i:s"));
|
||||
|
@ -1271,6 +1274,8 @@ class ActionBlog extends Action {
|
|||
$this->Viewer_Assign('BLOG_USER_ROLE_INVITE', LsBlog::BLOG_USER_ROLE_INVITE);
|
||||
$this->Viewer_Assign('BLOG_USER_ROLE_REJECT', LsBlog::BLOG_USER_ROLE_REJECT);
|
||||
$this->Viewer_Assign('BLOG_USER_ROLE_BAN', LsBlog::BLOG_USER_ROLE_BAN);
|
||||
|
||||
$this->Hook_Run('action_shutdown_blog');
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -28,7 +28,8 @@ class ActionBlogs extends Action {
|
|||
*/
|
||||
protected $sMenuHeadItemSelect='blog';
|
||||
|
||||
public function Init() {
|
||||
public function Init() {
|
||||
$this->Hook_Run('action_init_blogs');
|
||||
}
|
||||
|
||||
protected function RegisterEvent() {
|
||||
|
@ -76,7 +77,8 @@ class ActionBlogs extends Action {
|
|||
/**
|
||||
* Загружаем в шаблон необходимые переменные
|
||||
*/
|
||||
$this->Viewer_Assign('sMenuHeadItemSelect',$this->sMenuHeadItemSelect);
|
||||
$this->Viewer_Assign('sMenuHeadItemSelect',$this->sMenuHeadItemSelect);
|
||||
$this->Hook_Run('action_shutdown_blogs');
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -28,7 +28,8 @@ class ActionComments extends Action {
|
|||
*/
|
||||
protected $sMenuHeadItemSelect='blog';
|
||||
|
||||
public function Init() {
|
||||
public function Init() {
|
||||
$this->Hook_Run('action_init_comments');
|
||||
}
|
||||
|
||||
protected function RegisterEvent() {
|
||||
|
@ -80,7 +81,8 @@ class ActionComments extends Action {
|
|||
/**
|
||||
* Загружаем в шаблон необходимые переменные
|
||||
*/
|
||||
$this->Viewer_Assign('sMenuHeadItemSelect',$this->sMenuHeadItemSelect);
|
||||
$this->Viewer_Assign('sMenuHeadItemSelect',$this->sMenuHeadItemSelect);
|
||||
$this->Hook_Run('action_shutdown_comments');
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -27,6 +27,8 @@ class ActionError extends Action {
|
|||
public function Init() {
|
||||
$this->SetDefaultEvent('index');
|
||||
Router::SetIsShowStats(false);
|
||||
|
||||
$this->Hook_Run('action_init_error');
|
||||
}
|
||||
/**
|
||||
* Регистрируем евент
|
||||
|
|
|
@ -62,12 +62,15 @@ class ActionIndex extends Action {
|
|||
*
|
||||
*/
|
||||
public function Init() {
|
||||
$this->Hook_Run('action_init_index_before');
|
||||
/**
|
||||
* Подсчитываем новые топики
|
||||
*/
|
||||
$this->iCountTopicsCollectiveNew=$this->Topic_GetCountTopicsCollectiveNew();
|
||||
$this->iCountTopicsPersonalNew=$this->Topic_GetCountTopicsPersonalNew();
|
||||
$this->iCountTopicsNew=$this->iCountTopicsCollectiveNew+$this->iCountTopicsPersonalNew;
|
||||
|
||||
$this->Hook_Run('action_init_index_after');
|
||||
}
|
||||
/**
|
||||
* Регистрация евентов
|
||||
|
@ -126,7 +129,9 @@ class ActionIndex extends Action {
|
|||
$this->Viewer_Assign('sMenuSubItemSelect',$this->sMenuSubItemSelect);
|
||||
$this->Viewer_Assign('iCountTopicsNew',$this->iCountTopicsNew);
|
||||
$this->Viewer_Assign('iCountTopicsCollectiveNew',$this->iCountTopicsCollectiveNew);
|
||||
$this->Viewer_Assign('iCountTopicsPersonalNew',$this->iCountTopicsPersonalNew);
|
||||
$this->Viewer_Assign('iCountTopicsPersonalNew',$this->iCountTopicsPersonalNew);
|
||||
|
||||
$this->Hook_Run('action_shutdown_index');
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -50,10 +50,14 @@ class ActionLink extends Action {
|
|||
*
|
||||
* @return unknown
|
||||
*/
|
||||
public function Init() {
|
||||
public function Init() {
|
||||
$this->Hook_Run('action_init_link_before');
|
||||
|
||||
$this->oUserCurrent=$this->User_GetUserCurrent();
|
||||
$this->SetDefaultEvent('add');
|
||||
$this->Viewer_AddHtmlTitle($this->Lang_Get('topic_link_title'));
|
||||
|
||||
$this->Hook_Run('action_init_link_after');
|
||||
}
|
||||
/**
|
||||
* Регистрируем евенты
|
||||
|
@ -496,7 +500,9 @@ class ActionLink extends Action {
|
|||
public function EventShutdown() {
|
||||
$this->Viewer_Assign('sMenuHeadItemSelect',$this->sMenuHeadItemSelect);
|
||||
$this->Viewer_Assign('sMenuItemSelect',$this->sMenuItemSelect);
|
||||
$this->Viewer_Assign('sMenuSubItemSelect',$this->sMenuSubItemSelect);
|
||||
$this->Viewer_Assign('sMenuSubItemSelect',$this->sMenuSubItemSelect);
|
||||
|
||||
$this->Hook_Run('action_shutdown_link');
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -27,6 +27,8 @@ class ActionLogin extends Action {
|
|||
public function Init() {
|
||||
$this->SetDefaultEvent('index');
|
||||
Router::SetIsShowStats(false);
|
||||
|
||||
$this->Hook_Run('action_init_login');
|
||||
}
|
||||
/**
|
||||
* Регистрируем евенты
|
||||
|
|
|
@ -33,7 +33,8 @@ class ActionMy extends Action {
|
|||
*/
|
||||
protected $oUserProfile=null;
|
||||
|
||||
public function Init() {
|
||||
public function Init() {
|
||||
$this->Hook_Run('action_init_my');
|
||||
}
|
||||
|
||||
protected function RegisterEvent() {
|
||||
|
@ -139,6 +140,8 @@ class ActionMy extends Action {
|
|||
*
|
||||
*/
|
||||
public function EventShutdown() {
|
||||
$this->Hook_Run('action_shutdown_my_before');
|
||||
|
||||
if (!$this->oUserProfile) {
|
||||
return ;
|
||||
}
|
||||
|
@ -150,6 +153,8 @@ class ActionMy extends Action {
|
|||
$this->Viewer_Assign('oUserProfile',$this->oUserProfile);
|
||||
$this->Viewer_Assign('iCountTopicUser',$iCountTopicUser);
|
||||
$this->Viewer_Assign('iCountCommentUser',$iCountCommentUser);
|
||||
|
||||
$this->Hook_Run('action_shutdown_my_after');
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -61,13 +61,16 @@ class ActionNew extends Action {
|
|||
* Инициализация
|
||||
*
|
||||
*/
|
||||
public function Init() {
|
||||
public function Init() {
|
||||
$this->Hook_Run('action_init_new_before');
|
||||
/**
|
||||
* Подсчитываем новые топики
|
||||
*/
|
||||
$this->iCountTopicsCollectiveNew=$this->Topic_GetCountTopicsCollectiveNew();
|
||||
$this->iCountTopicsPersonalNew=$this->Topic_GetCountTopicsPersonalNew();
|
||||
$this->iCountTopicsNew=$this->iCountTopicsCollectiveNew+$this->iCountTopicsPersonalNew;
|
||||
|
||||
$this->Hook_Run('action_init_new_after');
|
||||
}
|
||||
/**
|
||||
* Регистрация евентов
|
||||
|
@ -127,6 +130,8 @@ class ActionNew extends Action {
|
|||
$this->Viewer_Assign('iCountTopicsNew',$this->iCountTopicsNew);
|
||||
$this->Viewer_Assign('iCountTopicsCollectiveNew',$this->iCountTopicsCollectiveNew);
|
||||
$this->Viewer_Assign('iCountTopicsPersonalNew',$this->iCountTopicsPersonalNew);
|
||||
|
||||
$this->Hook_Run('action_shutdown_new');
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -24,6 +24,7 @@ class ActionPage extends Action {
|
|||
protected $aBadPageUrl=array('admin');
|
||||
|
||||
public function Init() {
|
||||
$this->Hook_Run('action_init_page');
|
||||
}
|
||||
/**
|
||||
* Регистрируем евенты
|
||||
|
|
|
@ -31,9 +31,13 @@ class ActionPeople extends Action {
|
|||
* Инициализация
|
||||
*
|
||||
*/
|
||||
public function Init() {
|
||||
public function Init() {
|
||||
$this->Hook_Run('action_init_people_before');
|
||||
|
||||
$this->SetDefaultEvent('good');
|
||||
$this->Viewer_AddHtmlTitle($this->Lang_Get('people'));
|
||||
|
||||
$this->Hook_Run('action_init_people_after');
|
||||
}
|
||||
/**
|
||||
* Регистрируем евенты
|
||||
|
@ -239,7 +243,8 @@ class ActionPeople extends Action {
|
|||
/**
|
||||
* Загружаем в шаблон необходимые переменные
|
||||
*/
|
||||
$this->Viewer_Assign('sMenuHeadItemSelect',$this->sMenuHeadItemSelect);
|
||||
$this->Viewer_Assign('sMenuHeadItemSelect',$this->sMenuHeadItemSelect);
|
||||
$this->Hook_Run('action_shutdown_people');
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -45,6 +45,7 @@ class ActionPersonalBlog extends Action {
|
|||
*/
|
||||
public function Init() {
|
||||
$this->SetDefaultEvent('good');
|
||||
$this->Hook_Run('action_init_personal_blog');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -105,6 +106,7 @@ class ActionPersonalBlog extends Action {
|
|||
*
|
||||
*/
|
||||
public function EventShutdown() {
|
||||
$this->Hook_Run('action_shutdown_personal_blog_before');
|
||||
/**
|
||||
* Подсчитываем новые топики
|
||||
*/
|
||||
|
@ -120,6 +122,8 @@ class ActionPersonalBlog extends Action {
|
|||
$this->Viewer_Assign('iCountTopicsCollectiveNew',$iCountTopicsCollectiveNew);
|
||||
$this->Viewer_Assign('iCountTopicsPersonalNew',$iCountTopicsPersonalNew);
|
||||
$this->Viewer_Assign('iCountTopicsNew',$iCountTopicsNew);
|
||||
|
||||
$this->Hook_Run('action_shutdown_personal_blog_after');
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -28,12 +28,15 @@ class ActionPlugins extends Action {
|
|||
*/
|
||||
protected $sMenuHeadItemSelect='plugins';
|
||||
|
||||
public function Init() {
|
||||
public function Init() {
|
||||
$this->Hook_Run('action_init_plugins_before');
|
||||
|
||||
if(!$this->User_IsAuthorization() or !$oUserCurrent=$this->User_GetUserCurrent() or !$oUserCurrent->isAdministrator()) {
|
||||
return parent::EventNotFound();
|
||||
}
|
||||
|
||||
$this->oUserCurrent=$oUserCurrent;
|
||||
$this->Hook_Run('action_init_plugins_after');
|
||||
}
|
||||
|
||||
protected function RegisterEvent() {
|
||||
|
@ -115,7 +118,8 @@ class ActionPlugins extends Action {
|
|||
/**
|
||||
* Загружаем в шаблон необходимые переменные
|
||||
*/
|
||||
$this->Viewer_Assign('sMenuHeadItemSelect',$this->sMenuHeadItemSelect);
|
||||
$this->Viewer_Assign('sMenuHeadItemSelect',$this->sMenuHeadItemSelect);
|
||||
$this->Hook_Run('action_shutdown_plugins');
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -34,6 +34,7 @@ class ActionProfile extends Action {
|
|||
protected $oUserProfile;
|
||||
|
||||
public function Init() {
|
||||
$this->Hook_Run('action_init_profile');
|
||||
}
|
||||
|
||||
protected function RegisterEvent() {
|
||||
|
@ -668,7 +669,9 @@ class ActionProfile extends Action {
|
|||
/**
|
||||
* Выполняется при завершении работы экшена
|
||||
*/
|
||||
public function EventShutdown() {
|
||||
public function EventShutdown() {
|
||||
$this->Hook_Run('action_shutdown_profile_before');
|
||||
|
||||
if (!$this->oUserProfile) {
|
||||
return ;
|
||||
}
|
||||
|
@ -689,7 +692,9 @@ class ActionProfile extends Action {
|
|||
$this->Viewer_Assign('USER_FRIEND_OFFER',LsUser::USER_FRIEND_OFFER);
|
||||
$this->Viewer_Assign('USER_FRIEND_ACCEPT',LsUser::USER_FRIEND_ACCEPT);
|
||||
$this->Viewer_Assign('USER_FRIEND_REJECT',LsUser::USER_FRIEND_REJECT);
|
||||
$this->Viewer_Assign('USER_FRIEND_DELETE',LsUser::USER_FRIEND_DELETE);
|
||||
$this->Viewer_Assign('USER_FRIEND_DELETE',LsUser::USER_FRIEND_DELETE);
|
||||
|
||||
$this->Hook_Run('action_shutdown_profile_after');
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -50,7 +50,9 @@ class ActionQuestion extends Action {
|
|||
*
|
||||
* @return unknown
|
||||
*/
|
||||
public function Init() {
|
||||
public function Init() {
|
||||
$this->Hook_Run('action_init_question_before');
|
||||
|
||||
/**
|
||||
* Проверяем авторизован ли юзер
|
||||
*/
|
||||
|
@ -61,6 +63,8 @@ class ActionQuestion extends Action {
|
|||
$this->oUserCurrent=$this->User_GetUserCurrent();
|
||||
$this->SetDefaultEvent('add');
|
||||
$this->Viewer_AddHtmlTitle($this->Lang_Get('topic_question_title'));
|
||||
|
||||
$this->Hook_Run('action_init_question_after');
|
||||
}
|
||||
/**
|
||||
* Регистрируем евенты
|
||||
|
@ -506,7 +510,9 @@ class ActionQuestion extends Action {
|
|||
public function EventShutdown() {
|
||||
$this->Viewer_Assign('sMenuHeadItemSelect',$this->sMenuHeadItemSelect);
|
||||
$this->Viewer_Assign('sMenuItemSelect',$this->sMenuItemSelect);
|
||||
$this->Viewer_Assign('sMenuSubItemSelect',$this->sMenuSubItemSelect);
|
||||
$this->Viewer_Assign('sMenuSubItemSelect',$this->sMenuSubItemSelect);
|
||||
|
||||
$this->Hook_Run('action_shutdown_question');
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -26,6 +26,7 @@ class ActionRegistration extends Action {
|
|||
* @return unknown
|
||||
*/
|
||||
public function Init() {
|
||||
$this->Hook_Run('action_init_registration_before');
|
||||
/**
|
||||
* Проверяем аторизован ли юзер
|
||||
*/
|
||||
|
@ -42,6 +43,8 @@ class ActionRegistration extends Action {
|
|||
|
||||
$this->SetDefaultEvent('index');
|
||||
$this->Viewer_AddHtmlTitle($this->Lang_Get('registration'));
|
||||
|
||||
$this->Hook_Run('action_init_registration_after');
|
||||
}
|
||||
/**
|
||||
* Регистрируем евенты
|
||||
|
|
|
@ -31,7 +31,8 @@ class ActionRss extends Action {
|
|||
* Указывает браузеру правильный content type в случае вывода RSS-ленты
|
||||
*/
|
||||
protected function InitRss() {
|
||||
header('Content-Type: application/rss+xml; charset=utf-8');
|
||||
header('Content-Type: application/rss+xml; charset=utf-8');
|
||||
$this->Hook_Run('action_init_rss_after');
|
||||
}
|
||||
|
||||
protected function RegisterEvent() {
|
||||
|
|
|
@ -5,8 +5,12 @@ class ActionSearch extends Action {
|
|||
private $bIsResults = FALSE;
|
||||
|
||||
public function Init() {
|
||||
$this->Hook_Run('action_init_search_before');
|
||||
|
||||
$this->SetDefaultEvent('index');
|
||||
$this->Viewer_AddHtmlTitle($this->Lang_Get('search'));
|
||||
|
||||
$this->Hook_Run('action_init_search_after');
|
||||
}
|
||||
|
||||
protected function RegisterEvent() {
|
||||
|
|
|
@ -45,6 +45,7 @@ class ActionSettings extends Action {
|
|||
* @return unknown
|
||||
*/
|
||||
public function Init() {
|
||||
$this->Hook_Run('action_init_settings_before');
|
||||
/**
|
||||
* Проверяем авторизован ли юзер
|
||||
*/
|
||||
|
@ -57,7 +58,9 @@ class ActionSettings extends Action {
|
|||
*/
|
||||
$this->oUserCurrent=$this->User_GetUserCurrent();
|
||||
$this->SetDefaultEvent('profile');
|
||||
$this->Viewer_AddHtmlTitle($this->Lang_Get('settings_menu'));
|
||||
$this->Viewer_AddHtmlTitle($this->Lang_Get('settings_menu'));
|
||||
|
||||
$this->Hook_Run('action_init_settings_after');
|
||||
}
|
||||
|
||||
protected function RegisterEvent() {
|
||||
|
@ -370,7 +373,9 @@ class ActionSettings extends Action {
|
|||
* Загружаем в шаблон необходимые переменные
|
||||
*/
|
||||
$this->Viewer_Assign('sMenuItemSelect',$this->sMenuItemSelect);
|
||||
$this->Viewer_Assign('sMenuSubItemSelect',$this->sMenuSubItemSelect);
|
||||
$this->Viewer_Assign('sMenuSubItemSelect',$this->sMenuSubItemSelect);
|
||||
|
||||
$this->Hook_Run('action_shutdown_settings');
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -30,7 +30,8 @@ class ActionTag extends Action {
|
|||
* Инициализация
|
||||
*
|
||||
*/
|
||||
public function Init() {
|
||||
public function Init() {
|
||||
$this->Hook_Run('action_init_tag');
|
||||
}
|
||||
|
||||
protected function RegisterEvent() {
|
||||
|
@ -88,7 +89,8 @@ class ActionTag extends Action {
|
|||
/**
|
||||
* Загружаем в шаблон необходимые переменные
|
||||
*/
|
||||
$this->Viewer_Assign('sMenuHeadItemSelect',$this->sMenuHeadItemSelect);
|
||||
$this->Viewer_Assign('sMenuHeadItemSelect',$this->sMenuHeadItemSelect);
|
||||
$this->Hook_Run('action_shutdown_tag');
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -39,6 +39,7 @@ class ActionTalk extends Action {
|
|||
* @return unknown
|
||||
*/
|
||||
public function Init() {
|
||||
$this->Hook_Run('action_init_talk_before');
|
||||
/**
|
||||
* Проверяем авторизован ли юзер
|
||||
*/
|
||||
|
@ -51,7 +52,9 @@ class ActionTalk extends Action {
|
|||
*/
|
||||
$this->oUserCurrent=$this->User_GetUserCurrent();
|
||||
$this->SetDefaultEvent('inbox');
|
||||
$this->Viewer_AddHtmlTitle($this->Lang_Get('talk_menu_inbox'));
|
||||
$this->Viewer_AddHtmlTitle($this->Lang_Get('talk_menu_inbox'));
|
||||
|
||||
$this->Hook_Run('action_init_talk_after');
|
||||
}
|
||||
|
||||
protected function RegisterEvent() {
|
||||
|
@ -968,8 +971,9 @@ class ActionTalk extends Action {
|
|||
$this->Viewer_AssignAjax('aUsers',$aResult);
|
||||
}
|
||||
|
||||
public function EventShutdown()
|
||||
{
|
||||
public function EventShutdown() {
|
||||
$this->Hook_Run('action_shutdown_talk_before');
|
||||
|
||||
if (!$this->oUserCurrent) {
|
||||
return ;
|
||||
}
|
||||
|
@ -982,6 +986,8 @@ class ActionTalk extends Action {
|
|||
$this->Viewer_Assign('TALK_USER_ACTIVE',LsTalk::TALK_USER_ACTIVE);
|
||||
$this->Viewer_Assign('TALK_USER_DELETE_BY_SELF',LsTalk::TALK_USER_DELETE_BY_SELF);
|
||||
$this->Viewer_Assign('TALK_USER_DELETE_BY_AUTHOR',LsTalk::TALK_USER_DELETE_BY_AUTHOR);
|
||||
|
||||
$this->Hook_Run('action_shutdown_talk_after');
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -37,9 +37,13 @@ class ActionTop extends Action {
|
|||
* Инициализация
|
||||
*
|
||||
*/
|
||||
public function Init() {
|
||||
public function Init() {
|
||||
$this->Hook_Run('action_init_top_before');
|
||||
|
||||
$this->SetDefaultEvent('topic');
|
||||
$this->Viewer_AddHtmlTitle($this->Lang_Get('top'));
|
||||
|
||||
$this->Hook_Run('action_init_top_after');
|
||||
}
|
||||
/**
|
||||
* Регистрация евентов
|
||||
|
@ -163,6 +167,8 @@ class ActionTop extends Action {
|
|||
*
|
||||
*/
|
||||
public function EventShutdown() {
|
||||
$this->Hook_Run('action_shutdown_top_before');
|
||||
|
||||
/**
|
||||
* Получаем список новых топиков
|
||||
*/
|
||||
|
@ -177,6 +183,8 @@ class ActionTop extends Action {
|
|||
$this->Viewer_Assign('iCountTopicsCollectiveNew',$iCountTopicsCollectiveNew);
|
||||
$this->Viewer_Assign('iCountTopicsPersonalNew',$iCountTopicsPersonalNew);
|
||||
$this->Viewer_Assign('iCountTopicsNew',$iCountTopicsNew);
|
||||
|
||||
$this->Hook_Run('action_shutdown_top_after');
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -50,7 +50,9 @@ class ActionTopic extends Action {
|
|||
*
|
||||
* @return unknown
|
||||
*/
|
||||
public function Init() {
|
||||
public function Init() {
|
||||
$this->Hook_Run('action_init_topic_before');
|
||||
|
||||
/**
|
||||
* Проверяем авторизован ли юзер
|
||||
*/
|
||||
|
@ -60,6 +62,8 @@ class ActionTopic extends Action {
|
|||
$this->oUserCurrent=$this->User_GetUserCurrent();
|
||||
$this->SetDefaultEvent('add');
|
||||
$this->Viewer_AddHtmlTitle($this->Lang_Get('topic_title'));
|
||||
|
||||
$this->Hook_Run('action_init_topic_after');
|
||||
}
|
||||
/**
|
||||
* Регистрируем евенты
|
||||
|
@ -548,7 +552,9 @@ class ActionTopic extends Action {
|
|||
public function EventShutdown() {
|
||||
$this->Viewer_Assign('sMenuHeadItemSelect',$this->sMenuHeadItemSelect);
|
||||
$this->Viewer_Assign('sMenuItemSelect',$this->sMenuItemSelect);
|
||||
$this->Viewer_Assign('sMenuSubItemSelect',$this->sMenuSubItemSelect);
|
||||
$this->Viewer_Assign('sMenuSubItemSelect',$this->sMenuSubItemSelect);
|
||||
|
||||
$this->Hook_Run('action_shutdown_topic');
|
||||
}
|
||||
}
|
||||
?>
|
Loading…
Reference in a new issue