]> 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, 5 Jun 2012 15:51:52 +0000 (17:51 +0200)
config/config.sample.php
lib/util.php

index e86dc05cb01b8a0aa8d66b47de290d4298b052c3..7ab327e2bce9da619c590e5ebfba0e6fded74371 100644 (file)
@@ -29,6 +29,11 @@ $CONFIG = array(
 "log_type" => "",
 "logfile" => "",
 "loglevel" => "",
+/* 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 9a1fb7ac37054efd563e9217e6323251835951c2..7a9545e36592c23060e466641b127cb70dbfd347 100644 (file)
@@ -31,7 +31,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();