summaryrefslogtreecommitdiff
path: root/lib/installer.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-06-03 10:13:28 -0700
committerBrion Vibber <brion@pobox.com>2010-06-03 10:13:28 -0700
commit9bb48c36eab5e6856b7768c273d382a825f22ff0 (patch)
tree6d7fb6a4a1ce59dd4f6459552637f229ab866a4b /lib/installer.php
parent17ab15a3d02c335f2d9d333ac3773c037e796cf5 (diff)
Installer tweak to aid with IIS setup: if config.php exists, but is both empty and writable, let the installer proceed and overwrite it.
Diffstat (limited to 'lib/installer.php')
-rw-r--r--lib/installer.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/installer.php b/lib/installer.php
index 58ffbfef7..7936d5d5d 100644
--- a/lib/installer.php
+++ b/lib/installer.php
@@ -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', '<')) {