summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-12-01 16:37:29 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2014-12-01 16:37:29 +0100
commit0769556989f3426d1c8ab51043518e2748b143fe (patch)
treea32f4b4cf9fd1904dec339aed3e52da09c7171fa /lib/base.php
parent8db4dd7585aa9daebb32a3f3305f4061b17c316d (diff)
parentfc116f563fec20447e7300605d940cada975154c (diff)
downloadnextcloud-server-0769556989f3426d1c8ab51043518e2748b143fe.tar.gz
nextcloud-server-0769556989f3426d1c8ab51043518e2748b143fe.zip
Merge pull request #12419 from owncloud/read-only-config
Allow read-only configuration
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/base.php b/lib/base.php
index cd5d8feb1f6..74b668551ab 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -188,9 +188,9 @@ class OC {
public static function checkConfig() {
$l = \OC::$server->getL10N('lib');
- if (file_exists(self::$configDir . "/config.php")
- and !is_writable(self::$configDir . "/config.php")
- ) {
+ $configFileWritable = file_exists(self::$configDir . "/config.php") && is_writable(self::$configDir . "/config.php");
+ if (!$configFileWritable && !OC_Helper::isReadOnlyConfigEnabled()
+ || !$configFileWritable && \OCP\Util::needUpgrade()) {
if (self::$CLI) {
echo $l->t('Cannot write into "config" directory!')."\n";
echo $l->t('This can usually be fixed by giving the webserver write access to the config directory')."\n";