From: Aaron Schulz Date: Thu, 19 Jul 2018 16:11:39 +0000 (+0100) Subject: filebackend: let any specific backend value of "readOnly" override the default X-Git-Tag: 1.34.0-rc.0~4692^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/One?a=commitdiff_plain;h=e4558d4885779ae306f3d4219fd690c7a4ae169b;p=lhc%2Fweb%2Fwiklou.git filebackend: let any specific backend value of "readOnly" override the default Previously, only different reason strings could override, but there was no way to override the read-only mode to being off. Change-Id: I4266694034bfbdada90d4be96bcbc1a37f5b5409 --- diff --git a/includes/filebackend/FileBackendGroup.php b/includes/filebackend/FileBackendGroup.php index dc6dbe8f53..503acdcf42 100644 --- a/includes/filebackend/FileBackendGroup.php +++ b/includes/filebackend/FileBackendGroup.php @@ -123,9 +123,7 @@ class FileBackendGroup { } $class = $config['class']; - $config['readOnly'] = !empty( $config['readOnly'] ) - ? $config['readOnly'] - : $readOnlyReason; + $config['readOnly'] = $config['readOnly'] ?? $readOnlyReason; unset( $config['class'] ); // backend won't need this $this->backends[$name] = [