summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/files/appinfo/info.xml12
-rw-r--r--apps/files/lib/App.php10
-rw-r--r--apps/files/tests/Controller/ViewControllerTest.php10
3 files changed, 25 insertions, 7 deletions
diff --git a/apps/files/appinfo/info.xml b/apps/files/appinfo/info.xml
index 8b5678b331a..c49ec7aa407 100644
--- a/apps/files/appinfo/info.xml
+++ b/apps/files/appinfo/info.xml
@@ -55,10 +55,12 @@
<command>OCA\Files\Command\ScanAppData</command>
</commands>
- <navigation>
- <name>Files</name>
- <route>files.view.index</route>
- <order>0</order>
- </navigation>
+ <navigations>
+ <navigation>
+ <name>Files</name>
+ <route>files.view.index</route>
+ <order>0</order>
+ </navigation>
+ </navigations>
</info>
diff --git a/apps/files/lib/App.php b/apps/files/lib/App.php
index add27a2d2df..34d3ab4384c 100644
--- a/apps/files/lib/App.php
+++ b/apps/files/lib/App.php
@@ -40,7 +40,15 @@ class App {
public static function getNavigationManager() {
// TODO: move this into a service in the Application class
if (self::$navigationManager === null) {
- self::$navigationManager = new \OC\NavigationManager();
+ self::$navigationManager = new \OC\NavigationManager(
+ \OC::$server->getAppManager(),
+ \OC::$server->getURLGenerator(),
+ \OC::$server->getL10NFactory(),
+ \OC::$server->getUserSession(),
+ \OC::$server->getGroupManager(),
+ \OC::$server->getConfig()
+ );
+ self::$navigationManager->clear(false);
}
return self::$navigationManager;
}
diff --git a/apps/files/tests/Controller/ViewControllerTest.php b/apps/files/tests/Controller/ViewControllerTest.php
index 1d8c2956551..2e497405a4d 100644
--- a/apps/files/tests/Controller/ViewControllerTest.php
+++ b/apps/files/tests/Controller/ViewControllerTest.php
@@ -134,6 +134,7 @@ class ViewControllerTest extends TestCase {
'name' => \OC::$server->getL10N('files')->t('All files'),
'active' => false,
'icon' => '',
+ 'type' => 'link',
],
[
'id' => 'recent',
@@ -143,6 +144,7 @@ class ViewControllerTest extends TestCase {
'name' => \OC::$server->getL10N('files')->t('Recent'),
'active' => false,
'icon' => '',
+ 'type' => 'link',
],
[
'id' => 'favorites',
@@ -152,6 +154,7 @@ class ViewControllerTest extends TestCase {
'name' => null,
'active' => false,
'icon' => '',
+ 'type' => 'link',
],
[
'id' => 'sharingin',
@@ -161,6 +164,7 @@ class ViewControllerTest extends TestCase {
'name' => \OC::$server->getL10N('files_sharing')->t('Shared with you'),
'active' => false,
'icon' => '',
+ 'type' => 'link',
],
[
'id' => 'sharingout',
@@ -170,6 +174,7 @@ class ViewControllerTest extends TestCase {
'name' => \OC::$server->getL10N('files_sharing')->t('Shared with others'),
'active' => false,
'icon' => '',
+ 'type' => 'link',
],
[
'id' => 'sharinglinks',
@@ -179,6 +184,7 @@ class ViewControllerTest extends TestCase {
'name' => \OC::$server->getL10N('files_sharing')->t('Shared by link', []),
'active' => false,
'icon' => '',
+ 'type' => 'link',
],
[
'id' => 'systemtagsfilter',
@@ -188,6 +194,7 @@ class ViewControllerTest extends TestCase {
'name' => \OC::$server->getL10N('systemtags')->t('Tags'),
'active' => false,
'icon' => '',
+ 'type' => 'link',
],
[
'id' => 'trashbin',
@@ -197,7 +204,8 @@ class ViewControllerTest extends TestCase {
'name' => \OC::$server->getL10N('files_trashbin')->t('Deleted files'),
'active' => false,
'icon' => '',
- ],
+ 'type' => 'link',
+ ],
]);
$expected = new Http\TemplateResponse(