diff options
author | Joas Schilling <coding@schilljs.com> | 2018-01-29 13:14:56 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-01-29 15:47:37 +0100 |
commit | d971b104edc51ddf3819eded837de97357c3b395 (patch) | |
tree | 319d28bad58c1bd83c150950679fb4fa4a8369ef /lib/private/legacy/app.php | |
parent | 01482b32a171bb8529bc8baacbe764107e52e14c (diff) | |
download | nextcloud-server-d971b104edc51ddf3819eded837de97357c3b395.tar.gz nextcloud-server-d971b104edc51ddf3819eded837de97357c3b395.zip |
Do not cache the settings/sections in the database anymore
This caused more troubles then it had benefits, especially
when an app got disabled or was removed without being disabled.
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/legacy/app.php')
-rw-r--r-- | lib/private/legacy/app.php | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php index ea44ac8a144..f8f49d22115 100644 --- a/lib/private/legacy/app.php +++ b/lib/private/legacy/app.php @@ -176,6 +176,28 @@ class OC_App { \OC::$server->getActivityManager()->registerProvider($provider); } } + + if (!empty($info['settings']['admin'])) { + foreach ($info['settings']['admin'] as $setting) { + \OC::$server->getSettingsManager()->registerSetting('admin', $setting); + } + } + if (!empty($info['settings']['admin-section'])) { + foreach ($info['settings']['admin-section'] as $section) { + \OC::$server->getSettingsManager()->registerSection('admin', $section); + } + } + if (!empty($info['settings']['personal'])) { + foreach ($info['settings']['personal'] as $setting) { + \OC::$server->getSettingsManager()->registerSetting('personal', $setting); + } + } + if (!empty($info['settings']['personal-section'])) { + foreach ($info['settings']['personal-section'] as $section) { + \OC::$server->getSettingsManager()->registerSection('personal', $section); + } + } + if (!empty($info['collaboration']['plugins'])) { // deal with one or many plugin entries $plugins = isset($info['collaboration']['plugins']['plugin']['@value']) ? @@ -1007,7 +1029,6 @@ class OC_App { if(isset($info['settings']) && is_array($info['settings'])) { $appPath = self::getAppPath($app); self::registerAutoloading($app, $appPath); - \OC::$server->getSettingsManager()->setupSettings($info['settings']); } \OC_Hook::emit('OC_App', 'post_enable', array('app' => $app)); @@ -1055,9 +1076,6 @@ class OC_App { include $appPath . '/appinfo/update.php'; } self::setupBackgroundJobs($appData['background-jobs']); - if(isset($appData['settings']) && is_array($appData['settings'])) { - \OC::$server->getSettingsManager()->setupSettings($appData['settings']); - } //set remote/public handlers if (array_key_exists('ocsid', $appData)) { |