diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2017-03-08 00:19:24 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-03-13 08:52:54 +0100 |
commit | fbd2dd49b6a16a786c6d6da13e8065037577b7c4 (patch) | |
tree | b2144d11bc3118b5be19ebab31762fcbc1260138 /apps/files_trashbin | |
parent | f7cef9f7024a0f94a36746daee2fe4ef6335bac6 (diff) | |
download | nextcloud-server-fbd2dd49b6a16a786c6d6da13e8065037577b7c4.tar.gz nextcloud-server-fbd2dd49b6a16a786c6d6da13e8065037577b7c4.zip |
use closure to properly defer l10n initialization (#27328)
Diffstat (limited to 'apps/files_trashbin')
-rw-r--r-- | apps/files_trashbin/appinfo/app.php | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/apps/files_trashbin/appinfo/app.php b/apps/files_trashbin/appinfo/app.php index ed53657d22a..d4e44b78850 100644 --- a/apps/files_trashbin/appinfo/app.php +++ b/apps/files_trashbin/appinfo/app.php @@ -25,17 +25,16 @@ * */ -$l = \OC::$server->getL10N('files_trashbin'); - // register hooks \OCA\Files_Trashbin\Trashbin::registerHooks(); -\OCA\Files\App::getNavigationManager()->add( -array( - "id" => 'trashbin', - "appname" => 'files_trashbin', - "script" => 'list.php', - "order" => 50, - "name" => $l->t('Deleted files') -) -); +\OCA\Files\App::getNavigationManager()->add(function () { + $l = \OC::$server->getL10N('files_trashbin'); + return [ + 'id' => 'trashbin', + 'appname' => 'files_trashbin', + 'script' => 'list.php', + 'order' => 50, + 'name' => $l->t('Deleted files'), + ]; +}); |