Skip to content

Commit

Permalink
Merge pull request nextcloud#906 from nextcloud/files_external-settin…
Browse files Browse the repository at this point in the history
…gs-polish-missing

Files external settings polish
  • Loading branch information
MariusBluem authored Aug 18, 2016
2 parents 7d4d73d + f62f5c8 commit 426b948
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 12 additions & 1 deletion apps/files_external/lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,18 @@ public function __construct(array $urlParams = array()) {
* 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');
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion apps/files_external/lib/Lib/Backend/OwnCloud.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function __construct(IL10N $l, Password $legacyAuth) {
->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')))
Expand Down

0 comments on commit 426b948

Please sign in to comment.