summaryrefslogtreecommitdiffstats
path: root/settings/Controller
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2017-04-19 13:11:19 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2017-04-19 13:22:49 +0200
commitbe30ff59ef7bc9ac3ed71974373081763f0f2ec9 (patch)
tree9e38cce63f8db869ecaddfe555ab6056089a376f /settings/Controller
parentad24b86013d60e7efe2487ae06478f624b01824f (diff)
downloadnextcloud-server-be30ff59ef7bc9ac3ed71974373081763f0f2ec9.tar.gz
nextcloud-server-be30ff59ef7bc9ac3ed71974373081763f0f2ec9.zip
Do not show empty admin sections
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>
Diffstat (limited to 'settings/Controller')
-rw-r--r--settings/Controller/AdminSettingsController.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/settings/Controller/AdminSettingsController.php b/settings/Controller/AdminSettingsController.php
index 4bc986e708e..6c915be6f94 100644
--- a/settings/Controller/AdminSettingsController.php
+++ b/settings/Controller/AdminSettingsController.php
@@ -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();