mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-26 03:30:48 +03:00
fix redirect to install
This commit is contained in:
parent
9498d27c47
commit
df33fe774c
|
@ -40,20 +40,6 @@ class HookMain extends Hook
|
|||
*/
|
||||
public function InitAction()
|
||||
{
|
||||
/**
|
||||
* Проверяем наличие директории install
|
||||
*/
|
||||
if (is_dir(rtrim(Config::Get('path.application.server'),
|
||||
'/') . '/install') && (!isset($_SERVER['HTTP_APP_ENV']) or $_SERVER['HTTP_APP_ENV'] != 'test')
|
||||
) {
|
||||
if (Config::Get('install_completed')) {
|
||||
$this->Message_AddErrorSingle($this->Lang_Get('install_directory_exists'));
|
||||
Router::Action('error');
|
||||
} else {
|
||||
Router::Location(rtrim(str_replace('index.php', '', $_SERVER['PHP_SELF']),
|
||||
'/\\') . '/application/install/');
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Проверка на закрытый режим
|
||||
*/
|
||||
|
|
|
@ -67,3 +67,16 @@ $aRouterParams = array(/*
|
|||
}
|
||||
*/
|
||||
);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Проверяем наличие директории install
|
||||
*/
|
||||
if (is_dir(rtrim(Config::Get('path.application.server'),
|
||||
'/') . '/install') && (!isset($_SERVER['HTTP_APP_ENV']) or $_SERVER['HTTP_APP_ENV'] != 'test')
|
||||
) {
|
||||
$sUrl = rtrim(str_replace('index.php', '', $_SERVER['PHP_SELF']), '/\\') . '/application/install/';
|
||||
header('Location: ' . $sUrl, true, 302);
|
||||
exit();
|
||||
}
|
Loading…
Reference in a new issue