Move config.php writable test to update path
This should make it possible to use owncloud with a read-only config.php
This commit is contained in:
parent
45cff7b737
commit
1fa05894d5
|
@ -171,6 +171,13 @@ class OC{
|
||||||
echo 'Error while upgrading the database';
|
echo 'Error while upgrading the database';
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
if(file_exists(OC::$SERVERROOT."/config/config.php") and !is_writable(OC::$SERVERROOT."/config/config.php")) {
|
||||||
|
$tmpl = new OC_Template( '', 'error', 'guest' );
|
||||||
|
$tmpl->assign('errors',array(1=>array('error'=>"Can't write into config directory 'config'",'hint'=>"You can usually fix this by giving the webserver user write access to the config directory in owncloud")));
|
||||||
|
$tmpl->printPage();
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
OC_Config::setValue('version',implode('.',OC_Util::getVersion()));
|
OC_Config::setValue('version',implode('.',OC_Util::getVersion()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -226,10 +226,6 @@ class OC_Util {
|
||||||
$errors[]=array('error'=>'PHP module ctype is not installed.<br/>','hint'=>'Please ask your server administrator to install the module.');
|
$errors[]=array('error'=>'PHP module ctype is not installed.<br/>','hint'=>'Please ask your server administrator to install the module.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(file_exists(OC::$SERVERROOT."/config/config.php") and !is_writable(OC::$SERVERROOT."/config/config.php")){
|
|
||||||
$errors[]=array('error'=>"Can't write into config directory 'config'",'hint'=>"You can usually fix this by giving the webserver use write access to the config directory in owncloud");
|
|
||||||
}
|
|
||||||
|
|
||||||
return $errors;
|
return $errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue