summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2017-03-08 00:19:24 +0100
committerJoas Schilling <coding@schilljs.com>2017-03-13 08:52:54 +0100
commitfbd2dd49b6a16a786c6d6da13e8065037577b7c4 (patch)
treeb2144d11bc3118b5be19ebab31762fcbc1260138 /apps/files_external
parentf7cef9f7024a0f94a36746daee2fe4ef6335bac6 (diff)
downloadnextcloud-server-fbd2dd49b6a16a786c6d6da13e8065037577b7c4.tar.gz
nextcloud-server-fbd2dd49b6a16a786c6d6da13e8065037577b7c4.zip
use closure to properly defer l10n initialization (#27328)
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/appinfo/app.php19
1 files changed, 10 insertions, 9 deletions
diff --git a/apps/files_external/appinfo/app.php b/apps/files_external/appinfo/app.php
index 3a90cf0c2c1..925596198cf 100644
--- a/apps/files_external/appinfo/app.php
+++ b/apps/files_external/appinfo/app.php
@@ -37,15 +37,16 @@ $appContainer = \OC_Mount_Config::$app->getContainer();
\OC_Mount_Config::$app->registerSettings();
-$l = \OC::$server->getL10N('files_external');
-
-\OCA\Files\App::getNavigationManager()->add([
- "id" => 'extstoragemounts',
- "appname" => 'files_external',
- "script" => 'list.php',
- "order" => 30,
- "name" => $l->t('External storage')
-]);
+\OCA\Files\App::getNavigationManager()->add(function () {
+ $l = \OC::$server->getL10N('files_external');
+ return [
+ 'id' => 'extstoragemounts',
+ 'appname' => 'files_external',
+ 'script' => 'list.php',
+ 'order' => 30,
+ 'name' => $l->t('External storage'),
+ ];
+});
$mountProvider = $appContainer->query('OCA\Files_External\Config\ConfigAdapter');
\OC::$server->getMountProviderCollection()->registerProvider($mountProvider);