Fix detection of writable config (bug #1488447).

This commit is contained in:
Michal Čihař
2006-05-15 07:57:43 +00:00
parent 0381ffcd72
commit bd1c06cb4f
2 changed files with 3 additions and 1 deletions

View File

@@ -7,6 +7,7 @@ $Source$
2006-05-15 Michal Čihař <michal@cihar.com>
* scripts/setup.php: Compatibility with security tokens (bug #1488453).
* scripts/setup.php: Fix detection of writable config (bug #1488447).
2006-05-14 Michal Čihař <michal@cihar.com>
* libraries/common.lib.php: Fix reading database list with MySQL wildcards

View File

@@ -1155,7 +1155,8 @@ if ($action != 'download') {
// Check whether we can write to configuration
$fail_dir = FALSE;
$fail_dir = $fail_dir || !is_dir('./config/');
$fail_dir = $fail_dir || !is_writable('./config/config.inc.php');
$fail_dir = $fail_dir || !is_writable('./config/');
$fail_dir = $fail_dir || (file_exists('./config/config.inc.php') && !is_writable('./config/config.inc.php'));
$config = @fopen('./config/config.inc.php', 'a');
$fail_dir = $fail_dir || ($config === FALSE);
@fclose($config);