diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-02-17 22:01:53 +0100 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-02-17 22:10:03 +0100 |
commit | 1fa05894d51235a46cf67812227d5e8363f87d54 (patch) | |
tree | 5814c4e67301093739131ab4e9a57ee3507c8b15 /lib/base.php | |
parent | 45cff7b7378ff351158d9d93b879dcfc156171aa (diff) | |
download | nextcloud-server-1fa05894d51235a46cf67812227d5e8363f87d54.tar.gz nextcloud-server-1fa05894d51235a46cf67812227d5e8363f87d54.zip |
Move config.php writable test to update path
This should make it possible to use owncloud with a read-only config.php
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/base.php b/lib/base.php index 8f169a5732f..880645ff79d 100644 --- a/lib/base.php +++ b/lib/base.php @@ -171,6 +171,13 @@ class OC{ echo 'Error while upgrading the database'; 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())); } |