]> source.dussan.org Git - nextcloud-server.git/commitdiff
Make check for writable apps dir configurable
authorBart Visscher <bartv@thisnet.nl>
Tue, 5 Jun 2012 15:51:41 +0000 (17:51 +0200)
committerBart Visscher <bartv@thisnet.nl>
Tue, 19 Jun 2012 21:11:14 +0000 (23:11 +0200)
Conflicts:

config/config.sample.php

config/config.sample.php
lib/util.php

index 2205ee1b47b1db0c02eeed08acd2223e3ef1d158..21c728db441783d9da14443cbe47d721682dac0d 100644 (file)
@@ -31,6 +31,11 @@ $CONFIG = array(
 "loglevel" => "",
 "passwordsalt" => "",
 "updatechecker" => true,
+/* Set this to false to disable the check for writable apps dir.
+ * If the apps dir is not writable, you can't download&install extra apps
+ * in the admin apps menu.
+ */
+"writable_appsdir" => true,
 // "datadirectory" => ""
 );
 ?>
index c47a7e5d84c242dff82c85dbaf85352f2ac4f797..1dd11e7b5c88eda6f60364f2afdad374938499d0 100644 (file)
@@ -29,7 +29,7 @@ class OC_Util {
                }
 
                // Check if apps folder is writable.
-               if(!is_writable(OC::$SERVERROOT."/apps/")) {
+               if(OC_Config::getValue('writable_appsdir', true) && !is_writable(OC::$SERVERROOT."/apps/")) {
                        $tmpl = new OC_Template( '', 'error', 'guest' );
                        $tmpl->assign('errors',array(1=>array('error'=>"Can't write into apps directory 'apps'",'hint'=>"You can usually fix this by giving the webserver user write access to the config directory in owncloud")));
                        $tmpl->printPage();