mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-29 04:55:02 +03:00
Запрет повторной инициализации Viewer`а
This commit is contained in:
parent
65e0fc70b9
commit
8eb2e75ad9
|
@ -20,8 +20,20 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
abstract class Module extends Object {
|
abstract class Module extends Object {
|
||||||
|
/**
|
||||||
|
* Engine object
|
||||||
|
*
|
||||||
|
* @var Engine
|
||||||
|
*/
|
||||||
protected $oEngine=null;
|
protected $oEngine=null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Указывает на то, была ли проведенна инициализация модуля
|
||||||
|
*
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
protected $bIsInit=false;
|
||||||
|
|
||||||
final public function __construct(Engine $oEngine) {
|
final public function __construct(Engine $oEngine) {
|
||||||
$this->oEngine=$oEngine;
|
$this->oEngine=$oEngine;
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,6 +165,13 @@ class LsViewer extends Module {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function Init() {
|
public function Init() {
|
||||||
|
/**
|
||||||
|
* Проверяем, не была ли уже проведена инициализация
|
||||||
|
*/
|
||||||
|
if($this->bIsInit) {
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
$this->Hook_Run('viewer_init_start');
|
$this->Hook_Run('viewer_init_start');
|
||||||
/**
|
/**
|
||||||
* Заголовок HTML страницы
|
* Заголовок HTML страницы
|
||||||
|
@ -202,6 +209,10 @@ class LsViewer extends Module {
|
||||||
*/
|
*/
|
||||||
$this->InitFileParams();
|
$this->InitFileParams();
|
||||||
$this->sCacheDir = Config::Get('path.smarty.cache');
|
$this->sCacheDir = Config::Get('path.smarty.cache');
|
||||||
|
/**
|
||||||
|
* Устанавливаем флаг инициализации
|
||||||
|
*/
|
||||||
|
$this->bIsInit=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue