diff options
author | Joas Schilling <coding@schilljs.com> | 2017-10-04 16:35:10 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-10-05 11:34:03 +0200 |
commit | 6292f665d7d10f23cedc71befb2acb2ef467870a (patch) | |
tree | 4ddfeb4df9f5f7ce0477660a4334d900ec8ac8fe /lib/private/App | |
parent | 060eac40d868b55733fef0389b487ef64a211a4d (diff) | |
download | nextcloud-server-6292f665d7d10f23cedc71befb2acb2ef467870a.tar.gz nextcloud-server-6292f665d7d10f23cedc71befb2acb2ef467870a.zip |
Allow multiple settings and sections per app
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/App')
-rw-r--r-- | lib/private/App/InfoParser.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/private/App/InfoParser.php b/lib/private/App/InfoParser.php index 0531682d67a..40eaaf21bca 100644 --- a/lib/private/App/InfoParser.php +++ b/lib/private/App/InfoParser.php @@ -122,6 +122,21 @@ class InfoParser { if (!array_key_exists('providers', $array['activity'])) { $array['activity']['providers'] = []; } + if (!array_key_exists('settings', $array)) { + $array['settings'] = []; + } + if (!array_key_exists('admin', $array['settings'])) { + $array['settings']['admin'] = []; + } + if (!array_key_exists('admin-section', $array['settings'])) { + $array['settings']['admin-section'] = []; + } + if (!array_key_exists('personal', $array['settings'])) { + $array['settings']['personal'] = []; + } + if (!array_key_exists('personal-section', $array['settings'])) { + $array['settings']['personal-section'] = []; + } if (array_key_exists('types', $array)) { if (is_array($array['types'])) { @@ -171,6 +186,18 @@ class InfoParser { ) { $array['collaboration']['collaborators']['searchPlugins'] = $array['collaboration']['collaborators']['searchPlugins']['searchPlugin']; } + if (isset($array['settings']['admin']) && !is_array($array['settings']['admin'])) { + $array['settings']['admin'] = [$array['settings']['admin']]; + } + if (isset($array['settings']['admin-section']) && !is_array($array['settings']['admin-section'])) { + $array['settings']['admin-section'] = [$array['settings']['admin-section']]; + } + if (isset($array['settings']['personal']) && !is_array($array['settings']['personal'])) { + $array['settings']['personal'] = [$array['settings']['personal']]; + } + if (isset($array['settings']['personal-section']) && !is_array($array['settings']['personal-section'])) { + $array['settings']['personal-section'] = [$array['settings']['personal-section']]; + } if(!is_null($this->cache)) { $this->cache->set($fileCacheKey, json_encode($array)); |