diff --git a/application/classes/hooks/HookMain.class.php b/application/classes/hooks/HookMain.class.php index 217642e1..914ecbcd 100644 --- a/application/classes/hooks/HookMain.class.php +++ b/application/classes/hooks/HookMain.class.php @@ -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'); } diff --git a/install/build.sh b/install/build.sh index 8da99a07..8d03bfed 100755 --- a/install/build.sh +++ b/install/build.sh @@ -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 diff --git a/install/i18n/en.php b/install/i18n/en.php index 6eb19b29..3095636b 100644 --- a/install/i18n/en.php +++ b/install/i18n/en.php @@ -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', diff --git a/install/i18n/ru.php b/install/i18n/ru.php index 42a6ec3d..45972271 100644 --- a/install/i18n/ru.php +++ b/install/i18n/ru.php @@ -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'=>'Настройка базы данных', diff --git a/install/index.php b/install/index.php index c0b97055..461361d9 100644 --- a/install/index.php +++ b/install/index.php @@ -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', ''.$this->Lang('no').''); @@ -1019,7 +1019,7 @@ class Install { $this->Assign('validate_local_temp', ''.$this->Lang('yes').''); } - $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', ''.$this->Lang('no').''); @@ -1035,24 +1035,7 @@ class Install { $this->Assign('validate_local_uploads', ''.$this->Lang('yes').''); } - $sTemplatesDir = dirname(dirname(__FILE__)).'/templates/compiled'; - if(!is_dir($sTemplatesDir) or !is_writable($sTemplatesDir)) { - $bOk = false; - $this->Assign('validate_local_templates', ''.$this->Lang('no').''); - } else { - $this->Assign('validate_local_templates', ''.$this->Lang('yes').''); - } - - - $sTemplatesCacheDir = dirname(dirname(__FILE__)).'/templates/cache'; - if(!is_dir($sTemplatesCacheDir) or !is_writable($sTemplatesCacheDir)) { - $bOk = false; - $this->Assign('validate_local_templates_cache', ''.$this->Lang('no').''); - } else { - $this->Assign('validate_local_templates_cache', ''.$this->Lang('yes').''); - } - - $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', ''.$this->Lang('no').''); diff --git a/install/templates/steps/start.tpl b/install/templates/steps/start.tpl index f8bb0c59..6b63759c 100644 --- a/install/templates/steps/start.tpl +++ b/install/templates/steps/start.tpl @@ -35,13 +35,7 @@ ___LANG_START_PARAGRAPH___ ___LANG_LOCAL_UPLOADS_DIR______VALIDATE_LOCAL_UPLOADS___ - - - ___LANG_LOCAL_TEMPLATES_DIR______VALIDATE_LOCAL_TEMPLATES___ - - - ___LANG_LOCAL_TEMPLATES_CACHE_DIR______VALIDATE_LOCAL_TEMPLATES_CACHE___ - + ___LANG_LOCAL_PLUGINS_DIR______VALIDATE_LOCAL_PLUGINS___