Only show sharing section if it has content

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2019-05-20 18:07:24 +02:00 committed by Backportbot
parent 5b602723b1
commit 9ed21f521b
2 changed files with 7 additions and 0 deletions

View File

@ -80,6 +80,9 @@ class Personal implements ISettings {
* @since 9.1 * @since 9.1
*/ */
public function getSection() { public function getSection() {
if (!$this->federatedShareProvider->isOutgoingServer2serverShareEnabled()) {
return null;
}
return 'sharing'; return 'sharing';
} }

View File

@ -171,6 +171,10 @@ class Manager implements IManager {
continue; continue;
} }
if ($setting->getSection() === null) {
continue;
}
if (!isset($this->settings[$settingsType][$setting->getSection()])) { if (!isset($this->settings[$settingsType][$setting->getSection()])) {
$this->settings[$settingsType][$setting->getSection()] = []; $this->settings[$settingsType][$setting->getSection()] = [];
} }