]> source.dussan.org Git - nextcloud-server.git/commitdiff
Do not show empty admin sections 4395/head
authorRoeland Jago Douma <roeland@famdouma.nl>
Wed, 19 Apr 2017 11:11:19 +0000 (13:11 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Wed, 19 Apr 2017 11:22:49 +0000 (13:22 +0200)
Fixes #4393

It is far from efficient code. But then again it is easy to understand
and I doubt admins will browse it 24/7

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
settings/Controller/AdminSettingsController.php

index 4bc986e708e701ca4281f128a411c74f59bc1a03..6c915be6f941ba0691db0b5dcc4fd642506d8de2 100644 (file)
@@ -135,6 +135,10 @@ class AdminSettingsController extends Controller {
                /** @var \OC\Settings\Section[] $prioritizedSections */
                foreach($sections as $prioritizedSections) {
                        foreach ($prioritizedSections as $section) {
+                               if (empty($this->settingsManager->getAdminSettings($section->getID()))) {
+                                       continue;
+                               }
+
                                $icon = '';
                                if ($section instanceof IIconSection) {
                                        $icon = $section->getIcon();