summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2020-01-31 16:55:17 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2020-01-31 16:55:17 +0100
commitbfaf3fff33b663dd3e90f825445d1c95c98ea724 (patch)
tree5c25cb51be7e7fdbae01ef8a857654f724ea4695 /lib
parent78c7e6f2c5609122d047a36fc44390b42a341566 (diff)
downloadnextcloud-server-bfaf3fff33b663dd3e90f825445d1c95c98ea724.tar.gz
nextcloud-server-bfaf3fff33b663dd3e90f825445d1c95c98ea724.zip
Move Admin Settings also to info.xml
More cleanup of the Settings apps. Makes the manager cleaner and a proper manager. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Settings/Manager.php48
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()] = [];