Merge pull request #906 from nextcloud/files_external-settings-polish-missing

Files external settings polish
This commit is contained in:
Marius Blüm 2016-08-18 23:32:13 +02:00 committed by GitHub
commit a83c5e8b00
2 changed files with 13 additions and 2 deletions

View File

@ -68,7 +68,18 @@ class Application extends App implements IBackendProvider, IAuthMechanismProvide
* Register settings templates
*/
public function registerSettings() {
\OCP\App::registerPersonal('files_external', 'personal');
$container = $this->getContainer();
$userSession = $container->getServer()->getUserSession();
if (!$userSession->isLoggedIn()) {
return;
}
$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');
}
}
/**

View File

@ -37,7 +37,7 @@ class OwnCloud extends Backend {
->setIdentifier('owncloud')
->addIdentifierAlias('\OC\Files\Storage\OwnCloud') // legacy compat
->setStorageClass('\OCA\Files_External\Lib\Storage\OwnCloud')
->setText($l->t('ownCloud'))
->setText($l->t('Nextcloud'))
->addParameters([
(new DefinitionParameter('host', $l->t('URL'))),
(new DefinitionParameter('root', $l->t('Remote subfolder')))