diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2020-02-03 11:39:02 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-03 11:39:02 +0300 |
commit | 846eb8ee1d2e19e935e9d8d77805c7b0d3329b35 (patch) | |
tree | ae82fef5fd580ae3362ddf3e72b8b181f7702373 /lib | |
parent | 750181d28328cff8b983bedb7ff898e60aa164a1 (diff) | |
parent | bfaf3fff33b663dd3e90f825445d1c95c98ea724 (diff) |
Merge pull request #19243 from nextcloud/enh/settings/admin_settings_to_info_xml
Move Admin Settings also to info.xml
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Settings/Manager.php | 48 |
1 files changed, 1 insertions, 47 deletions
diff --git a/lib/private/Settings/Manager.php b/lib/private/Settings/Manager.php index 8018ecaba61..ed1d2f45cd7 100644 --- a/lib/private/Settings/Manager.php +++ b/lib/private/Settings/Manager.php @@ -228,51 +228,6 @@ class Manager implements IManager { } /** - * @param string $section - * @param Closure $filter - * - * @return ISection[] - */ - private function getBuiltInAdminSettings($section, Closure $filter = null): array { - $forms = []; - - if ($section === 'overview') { - /** @var ISettings $form */ - $form = $this->container->query(\OCA\Settings\Admin\Overview::class); - if ($filter === null || $filter($form)) { - $forms[$form->getPriority()] = [$form]; - } - } - if ($section === 'server') { - /** @var ISettings $form */ - $form = $this->container->query(\OCA\Settings\Admin\Server::class); - if ($filter === null || $filter($form)) { - $forms[$form->getPriority()] = [$form]; - } - $form = $this->container->query(\OCA\Settings\Admin\Mail::class); - if ($filter === null || $filter($form)) { - $forms[$form->getPriority()] = [$form]; - } - } - if ($section === 'security') { - /** @var ISettings $form */ - $form = $this->container->query(\OCA\Settings\Admin\Security::class); - if ($filter === null || $filter($form)) { - $forms[$form->getPriority()] = [$form]; - } - } - if ($section === 'sharing') { - /** @var ISettings $form */ - $form = $this->container->query(\OCA\Settings\Admin\Sharing::class); - if ($filter === null || $filter($form)) { - $forms[$form->getPriority()] = [$form]; - } - } - - return $forms; - } - - /** * @inheritdoc */ public function getAdminSettings($section, bool $subAdminOnly = false): array { @@ -280,13 +235,12 @@ class Manager implements IManager { $subAdminSettingsFilter = function(ISettings $settings) { return $settings instanceof ISubAdminSettings; }; - $settings = $this->getBuiltInAdminSettings($section, $subAdminSettingsFilter); $appSettings = $this->getSettings('admin', $section, $subAdminSettingsFilter); } else { - $settings = $this->getBuiltInAdminSettings($section); $appSettings = $this->getSettings('admin', $section); } + $settings = []; foreach ($appSettings as $setting) { if (!isset($settings[$setting->getPriority()])) { $settings[$setting->getPriority()] = []; |