1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-05-20 17:58:24 +03:00

Install: проверка наличия и доступа для записи директории /plugins

This commit is contained in:
Alexey Kachayev 2010-01-08 23:56:40 +00:00
parent 821e358b97
commit efc47e8998
4 changed files with 17 additions and 4 deletions

View file

@ -976,7 +976,7 @@ class Install {
/**
* Проверяем доступность и достаточность прав у директории
* для сохранения файлового кеша, /logs, /uploads, /templates/compiled
* для сохранения файлового кеша, /logs, /uploads, /templates/compiled, /plugins
*/
$sTempDir = dirname(dirname(__FILE__)).'/tmp';
if(!is_dir($sTempDir) or !is_writable($sTempDir)) {
@ -1018,7 +1018,15 @@ class Install {
} else {
$this->Assign('validate_local_templates_cache', '<span style="color:green;">'.$this->Lang('yes').'</span>');
}
$sPluginsDir = dirname(dirname(__FILE__)).'/plugins';
if(!is_dir($sPluginsDir) or !is_writable($sPluginsDir)) {
$bOk = false;
$this->Assign('validate_local_plugins', '<span style="color:red;">'.$this->Lang('no').'</span>');
} else {
$this->Assign('validate_local_plugins', '<span style="color:green;">'.$this->Lang('yes').'</span>');
}
return $bOk;
}
/**
@ -1213,7 +1221,7 @@ class Install {
}
if(!mysql_query($sSqlUpdate)) $aErrors[] = mysql_error();
}
}
}
/**
* Удаляем поле blog_avatar_type
*/
@ -1435,7 +1443,7 @@ class Install {
`blog_title` = '".mysql_real_escape_string($sBlogName)."'
WHERE `blog_id` = 1";
return mysql_query($sQuery);
return mysql_query($sQuery);
}
/**
* Проверяет, использует ли mysql запрос, одну из указанных в массиве таблиц

View file

@ -70,6 +70,7 @@ return array(
'local_uploads_dir'=>'Directory /uploads exists and is writable',
'local_templates_dir'=>'Directory /templates/compiled exists and is writable',
'local_templates_cache_dir'=>'Directory /templates/cache exists and is writable',
'local_plugins_dir'=>'Directory /plugins exists and is writable',
'db_params'=>'Database settings',
'db_params_host'=>'Database server',

View file

@ -70,6 +70,7 @@ return array(
'local_uploads_dir'=>'Директория /uploads существует и доступна для записи',
'local_templates_dir'=>'Директория /templates/compiled существует и доступна для записи',
'local_templates_cache_dir'=>'Директория /templates/cache существует и доступна для записи',
'local_plugins_dir'=>'Директория /plugins существует и доступна для записи',
'db_params'=>'Настройка базы данных',
'db_params_host'=>'Имя сервера БД',

View file

@ -36,4 +36,7 @@ ___LANG_START_PARAGRAPH___
<tr>
<td width="350px">___LANG_LOCAL_TEMPLATES_CACHE_DIR___</td><td>___VALIDATE_LOCAL_TEMPLATES_CACHE___</td>
</tr>
<tr>
<td width="350px">___LANG_LOCAL_PLUGINS_DIR___</td><td>___VALIDATE_LOCAL_PLUGINS___</td>
</tr>
</table>