diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2015-01-23 10:50:25 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2015-01-23 11:00:53 +0100 |
commit | c61e9f391273e5f7f4b7aa91ee4174d47402cae9 (patch) | |
tree | 1993ccdd315b3ea8d14123ee3514fde2b8707d4f /lib/private/legacy | |
parent | bc93a8f14094dfb59c826ffa76d7b046370b0410 (diff) | |
download | nextcloud-server-c61e9f391273e5f7f4b7aa91ee4174d47402cae9.tar.gz nextcloud-server-c61e9f391273e5f7f4b7aa91ee4174d47402cae9.zip |
Add a method to set/unset multiple config values in one call
This reduces the number of file writes we do for config.php and therefor
hopefully helps lowering the chances for empty config.php files
Diffstat (limited to 'lib/private/legacy')
-rw-r--r-- | lib/private/legacy/config.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/private/legacy/config.php b/lib/private/legacy/config.php index 7b711204256..64d01434b11 100644 --- a/lib/private/legacy/config.php +++ b/lib/private/legacy/config.php @@ -59,6 +59,16 @@ class OC_Config { } /** + * Sets and deletes values and writes the config.php + * + * @param array $configs Associative array with `key => value` pairs + * If value is null, the config key will be deleted + */ + public static function setValues(array $configs) { + self::$object->setValues($configs); + } + + /** * Removes a key from the config * @param string $key key * |