dont register personal files_external setting if it's empty
This commit is contained in:
parent
c5c71c668d
commit
5dd20a55e8
1 changed files with 8 additions and 1 deletions
|
@ -68,7 +68,14 @@ class Application extends App implements IBackendProvider, IAuthMechanismProvide
|
|||
* Register settings templates
|
||||
*/
|
||||
public function registerSettings() {
|
||||
\OCP\App::registerPersonal('files_external', 'personal');
|
||||
$container = $this->getContainer();
|
||||
$backendService = $container->query('OCA\\Files_External\\Service\\BackendService');
|
||||
|
||||
/** @var \OCA\Files_External\Service\UserGlobalStoragesService $userGlobalStoragesService */
|
||||
$userGlobalStoragesService = $container->query('OCA\Files_External\Service\UserGlobalStoragesService');
|
||||
if (count($userGlobalStoragesService->getStorages()) > 0 || $backendService->isUserMountingAllowed()) {
|
||||
\OCP\App::registerPersonal('files_external', 'personal');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue