Installer tweak to aid with IIS setup: if config.php exists, but is both empty and writable, let the installer proceed and overwrite it.

This commit is contained in:
Brion Vibber 2010-06-03 10:13:28 -07:00
parent 17ab15a3d0
commit 9bb48c36ea
1 changed files with 6 additions and 3 deletions

View File

@ -81,9 +81,12 @@ abstract class Installer
{
$pass = true;
if (file_exists(INSTALLDIR.'/config.php')) {
$this->warning('Config file "config.php" already exists.');
$pass = false;
$config = INSTALLDIR.'/config.php';
if (file_exists($config)) {
if (!is_writable($config) || filesize($config) > 0) {
$this->warning('Config file "config.php" already exists.');
$pass = false;
}
}
if (version_compare(PHP_VERSION, '5.2.3', '<')) {