Merge pull request #15638 from nextcloud/bugfix/7965/sharing-hide-if-empty

Only show sharing section if it has content
This commit is contained in:
Morris Jobke 2019-05-21 10:33:07 +02:00 committed by GitHub
commit ac92603014
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

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

View File

@ -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()] = [];
}