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/systemconfig.php | |
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/systemconfig.php')
-rw-r--r-- | lib/private/systemconfig.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/private/systemconfig.php b/lib/private/systemconfig.php index ce6883e5ab3..36cefdb8499 100644 --- a/lib/private/systemconfig.php +++ b/lib/private/systemconfig.php @@ -28,6 +28,16 @@ class SystemConfig { } /** + * 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 function setValues(array $configs) { + \OC_Config::setValues($configs); + } + + /** * Looks up a system wide defined value * * @param string $key the key of the value, under which it was saved |