]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Installer tweak to aid with IIS setup: if config.php exists, but is both empty and...
authorBrion Vibber <brion@pobox.com>
Thu, 3 Jun 2010 17:13:28 +0000 (10:13 -0700)
committerBrion Vibber <brion@pobox.com>
Thu, 3 Jun 2010 17:13:28 +0000 (10:13 -0700)
lib/installer.php

index 58ffbfef7e2c5efcf0d00e588df811cee3ba35f5..7936d5d5d16a43896fa96e769be1e474b9ed6b8d 100644 (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', '<')) {