diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-05-20 18:07:24 +0200 |
---|---|---|
committer | Backportbot <backportbot-noreply@rullzer.com> | 2019-05-21 08:34:40 +0000 |
commit | 32a18602fdc53348f7365dd27fec9968d17b1990 (patch) | |
tree | 6023916cdf4b3f245c44028bb89b0cae31e10a4e | |
parent | df3a4c7d9ffb2f290f53f42999e02145afda5ef3 (diff) | |
download | nextcloud-server-32a18602fdc53348f7365dd27fec9968d17b1990.tar.gz nextcloud-server-32a18602fdc53348f7365dd27fec9968d17b1990.zip |
Only show sharing section if it has content
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-rw-r--r-- | apps/federatedfilesharing/lib/Settings/Personal.php | 3 | ||||
-rw-r--r-- | lib/private/Settings/Manager.php | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/apps/federatedfilesharing/lib/Settings/Personal.php b/apps/federatedfilesharing/lib/Settings/Personal.php index 96c762c9e4a..d50fa7202f3 100644 --- a/apps/federatedfilesharing/lib/Settings/Personal.php +++ b/apps/federatedfilesharing/lib/Settings/Personal.php @@ -80,6 +80,9 @@ class Personal implements ISettings { * @since 9.1 */ public function getSection() { + if (!$this->federatedShareProvider->isOutgoingServer2serverShareEnabled()) { + return null; + } return 'sharing'; } diff --git a/lib/private/Settings/Manager.php b/lib/private/Settings/Manager.php index 42ec16e223b..7281d7bf72e 100644 --- a/lib/private/Settings/Manager.php +++ b/lib/private/Settings/Manager.php @@ -171,6 +171,10 @@ class Manager implements IManager { continue; } + if ($setting->getSection() === null) { + continue; + } + if (!isset($this->settings[$settingsType][$setting->getSection()])) { $this->settings[$settingsType][$setting->getSection()] = []; } |