diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2020-01-30 13:30:45 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2020-01-30 22:06:28 +0100 |
commit | c9253cce6cacedc19dbb04d8dd89a3da1473ef20 (patch) | |
tree | 7f4b8e715d6c402a1ce7dcfadcc7bae0db43ef53 /lib | |
parent | dc1979903ef4c88ad0ae06b40386e2fa339837c2 (diff) | |
download | nextcloud-server-c9253cce6cacedc19dbb04d8dd89a3da1473ef20.tar.gz nextcloud-server-c9253cce6cacedc19dbb04d8dd89a3da1473ef20.zip |
Move personal settings to proper registration
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Settings/Manager.php | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/lib/private/Settings/Manager.php b/lib/private/Settings/Manager.php index 157ab9db1d3..8018ecaba61 100644 --- a/lib/private/Settings/Manager.php +++ b/lib/private/Settings/Manager.php @@ -175,7 +175,7 @@ class Manager implements IManager { try { /** @var ISettings $setting */ - $setting = \OC::$server->query($class); + $setting = $this->container->query($class); } catch (QueryException $e) { $this->log->logException($e, ['level' => ILogger::INFO]); continue; @@ -273,39 +273,6 @@ class Manager implements IManager { } /** - * @param string $section - * - * @return ISection[] - */ - private function getBuiltInPersonalSettings($section): array { - $forms = []; - - if ($section === 'personal-info') { - /** @var ISettings $form */ - $form = $this->container->query(\OCA\Settings\Personal\PersonalInfo::class); - $forms[$form->getPriority()] = [$form]; - $form = new \OCA\Settings\Personal\ServerDevNotice(); - $forms[$form->getPriority()] = [$form]; - } - if ($section === 'security') { - /** @var ISettings $form */ - $form = $this->container->query(\OCA\Settings\Personal\Security\Password::class); - $forms[$form->getPriority()] = [$form]; - - /** @var ISettings $form */ - $form = $this->container->query(\OCA\Settings\Personal\Security\Authtokens::class); - $forms[$form->getPriority()] = [$form]; - } - if ($section === 'additional') { - /** @var ISettings $form */ - $form = $this->container->query(\OCA\Settings\Personal\Additional::class); - $forms[$form->getPriority()] = [$form]; - } - - return $forms; - } - - /** * @inheritdoc */ public function getAdminSettings($section, bool $subAdminOnly = false): array { @@ -380,7 +347,7 @@ class Manager implements IManager { * @inheritdoc */ public function getPersonalSettings($section): array { - $settings = $this->getBuiltInPersonalSettings($section); + $settings = []; $appSettings = $this->getSettings('personal', $section); foreach ($appSettings as $setting) { |