]> source.dussan.org Git - nextcloud-server.git/commitdiff
only check for a writeable config.php when attempting to change the config
authorRobin <Robin Appelman icewind1991@gmail.com>
Sat, 22 May 2010 22:18:37 +0000 (00:18 +0200)
committerRobin <Robin Appelman icewind1991@gmail.com>
Sat, 22 May 2010 22:18:37 +0000 (00:18 +0200)
inc/lib_base.php
inc/templates/adminform.php

index 3a8ad7163f86c0986d839e2da095e511718618b8..14b9aa10afc648b5d607877f6741027759fbd0bb 100755 (executable)
@@ -151,10 +151,8 @@ class OC_UTIL {
     global $CONFIG_DATADIRECTORY_ROOT;
     global $CONFIG_BACKUPDIRECTORY;
     global $CONFIG_ENABLEBACKUP;
+    global $CONFIG_INSTALLED;
     $error='';
-    $f=@fopen($SERVERROOT.'/config/config.php','w+');
-    if(!$f) $error.='Error: Config file (config/config.php) is not writable for the webserver.<br/>';
-    @fclose($f);
     if(!is_callable('sqlite_open') and !is_callable('mysql_connect')){
                $error.='No database drivers (sqlite or mysql) installed.<br/>';
     }
index 5ef5fa68cb533f21bf41043877474eaa97d24672..ef45bd9ee2648a423b47c164492681ac0b688d34 100755 (executable)
@@ -4,6 +4,9 @@ global $CONFIG_ENABLEBACKUP;
 global $CONFIG_DATADIRECTORY_ROOT;
 global $CONFIG_BACKUPDIRECTORY;
 global $CONFIG_ERROR;
+$f=@fopen($SERVERROOT.'/config/config.php','r+');
+if(!$f) die('Error: Config file (config/config.php) is not writable for the webserver.<br/>');
+@fclose($f);
 if(!isset($fillDB)) $fillDB=true;
 if(!isset($CONFIG_DBHOST)) $CONFIG_DBHOST='localhost';
 if(!isset($CONFIG_DBUSER)) $CONFIG_DBUSER='owncloud';