Additional ptrefixcheck on company creation, safer company removal sequence.
[fa-stable.git] / admin / db / maintenance_db.inc
index df1abfd9cbf76de1bc5527202fe21ef86653eee3..adac0f63fe959dced38c9a796dc5ead35b98f9a3 100644 (file)
@@ -98,7 +98,7 @@ function write_config_db($new = false)
 
        $filename = $path_to_root . "/config_db.php";
        // Check if the file exists and is writable first.
-       if (!file_exists($filename) || (is_writable($path_to_root) && is_writable($filename)))
+       if ((!file_exists($filename) && is_writable($path_to_root)) || is_writable($filename))
        {
                if (!$zp = fopen($filename, 'w'))
                {