1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-06-26 03:30:48 +03:00

fix инсталлятора

This commit is contained in:
Mzhelskiy Maxim 2013-08-09 11:25:40 +07:00
parent e8e63d0e55
commit 6582e30a1d
6 changed files with 14 additions and 43 deletions

View file

@ -35,7 +35,7 @@ class HookMain extends Hook {
/**
* Проверяем наличие директории install
*/
if(is_dir(rtrim(Config::Get('path.root.server'),'/').'/install') && $_SERVER['HTTP_APP_ENV']!='test'){
if(is_dir(rtrim(Config::Get('path.root.server'),'/').'/install') && (!isset($_SERVER['HTTP_APP_ENV']) or $_SERVER['HTTP_APP_ENV']!='test')){
$this->Message_AddErrorSingle($this->Lang_Get('install_directory_exists'));
Router::Action('error');
}

View file

@ -3,14 +3,12 @@
ABSOLUTE_FILENAME=`readlink -e "$0"`
DIRECTORY=`dirname "$ABSOLUTE_FILENAME"`
if [ ! -e "$DIRECTORY/../config/config.local.php" ]; then
cp $DIRECTORY/../config/config.local.dist.php $DIRECTORY/../config/config.local.php
if [ ! -e "$DIRECTORY/../application/config/config.local.php" ]; then
cp $DIRECTORY/../application/config/config.local.dist.php $DIRECTORY/../application/config/config.local.php
fi
chmod 777 $DIRECTORY/../config/config.local.php
chmod 777 $DIRECTORY/../tmp
chmod 777 $DIRECTORY/../logs
chmod 777 $DIRECTORY/../application/config/config.local.php
chmod 777 $DIRECTORY/../application/tmp
chmod 777 $DIRECTORY/../application/logs
chmod 777 $DIRECTORY/../uploads
chmod 777 $DIRECTORY/../templates/compiled
chmod 777 $DIRECTORY/../templates/cache
chmod 777 $DIRECTORY/../plugins
chmod 777 $DIRECTORY/../application/plugins

View file

@ -69,8 +69,6 @@ return array(
'local_temp_dir'=>'Directory /tmp exists and writable',
'local_logs_dir'=>'Directory /logs exists and writable',
'local_uploads_dir'=>'Directory /uploads exists and writable',
'local_templates_dir'=>'Directory /templates/compiled exists and writable',
'local_templates_cache_dir'=>'Directory /templates/cache exists and writable',
'local_plugins_dir'=>'Directory /plugins exists and writable',
'db_params'=>'Database (DB) configuration',

View file

@ -69,8 +69,6 @@ return array(
'local_temp_dir'=>'Директория /tmp существует и доступна для записи',
'local_logs_dir'=>'Директория /logs существует и доступна для записи',
'local_uploads_dir'=>'Директория /uploads существует и доступна для записи',
'local_templates_dir'=>'Директория /templates/compiled существует и доступна для записи',
'local_templates_cache_dir'=>'Директория /templates/cache существует и доступна для записи',
'local_plugins_dir'=>'Директория /plugins существует и доступна для записи',
'db_params'=>'Настройка базы данных',

View file

@ -167,9 +167,9 @@ class Install {
*
*/
public function __construct() {
$this->sConfigDir = dirname(__FILE__).'/../config';
$this->sSkinDir = dirname(__FILE__).'/../templates/skin';
$this->sLangDir = dirname(__FILE__).'/../templates/i18n';
$this->sConfigDir = dirname(__FILE__).'/../application/config';
$this->sSkinDir = dirname(__FILE__).'/../application/frontend/skin';
$this->sLangDir = dirname(__FILE__).'/../application/frontend/i18n';
/**
* Загружаем языковые файлы
*/
@ -1011,7 +1011,7 @@ class Install {
* Проверяем доступность и достаточность прав у директории
* для сохранения файлового кеша, /logs, /uploads, /templates/compiled, /plugins
*/
$sTempDir = dirname(dirname(__FILE__)).'/tmp';
$sTempDir = dirname(dirname(__FILE__)).'/application/tmp';
if(!is_dir($sTempDir) or !is_writable($sTempDir)) {
$bOk = false;
$this->Assign('validate_local_temp', '<span style="color:red;">'.$this->Lang('no').'</span>');
@ -1019,7 +1019,7 @@ class Install {
$this->Assign('validate_local_temp', '<span style="color:green;">'.$this->Lang('yes').'</span>');
}
$sLogsDir = dirname(dirname(__FILE__)).'/logs';
$sLogsDir = dirname(dirname(__FILE__)).'/application/logs';
if(!is_dir($sLogsDir) or !is_writable($sLogsDir)) {
$bOk = false;
$this->Assign('validate_local_logs', '<span style="color:red;">'.$this->Lang('no').'</span>');
@ -1035,24 +1035,7 @@ class Install {
$this->Assign('validate_local_uploads', '<span style="color:green;">'.$this->Lang('yes').'</span>');
}
$sTemplatesDir = dirname(dirname(__FILE__)).'/templates/compiled';
if(!is_dir($sTemplatesDir) or !is_writable($sTemplatesDir)) {
$bOk = false;
$this->Assign('validate_local_templates', '<span style="color:red;">'.$this->Lang('no').'</span>');
} else {
$this->Assign('validate_local_templates', '<span style="color:green;">'.$this->Lang('yes').'</span>');
}
$sTemplatesCacheDir = dirname(dirname(__FILE__)).'/templates/cache';
if(!is_dir($sTemplatesCacheDir) or !is_writable($sTemplatesCacheDir)) {
$bOk = false;
$this->Assign('validate_local_templates_cache', '<span style="color:red;">'.$this->Lang('no').'</span>');
} else {
$this->Assign('validate_local_templates_cache', '<span style="color:green;">'.$this->Lang('yes').'</span>');
}
$sPluginsDir = dirname(dirname(__FILE__)).'/plugins';
$sPluginsDir = dirname(dirname(__FILE__)).'/application/plugins';
if(!is_dir($sPluginsDir) or !is_writable($sPluginsDir)) {
$bOk = false;
$this->Assign('validate_local_plugins', '<span style="color:red;">'.$this->Lang('no').'</span>');

View file

@ -35,13 +35,7 @@ ___LANG_START_PARAGRAPH___
</tr>
<tr>
<td>___LANG_LOCAL_UPLOADS_DIR___</td><td class="result">___VALIDATE_LOCAL_UPLOADS___</td>
</tr>
<tr>
<td>___LANG_LOCAL_TEMPLATES_DIR___</td><td class="result">___VALIDATE_LOCAL_TEMPLATES___</td>
</tr>
<tr>
<td>___LANG_LOCAL_TEMPLATES_CACHE_DIR___</td><td class="result">___VALIDATE_LOCAL_TEMPLATES_CACHE___</td>
</tr>
</tr>
<tr>
<td>___LANG_LOCAL_PLUGINS_DIR___</td><td class="result">___VALIDATE_LOCAL_PLUGINS___</td>
</tr>