Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion core/Controller/NavigationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function getAppsNavigation(bool $absolute = false): DataResponse {
if ($absolute) {
$navigation = $this->rewriteToAbsoluteUrls($navigation);
}

$navigation = array_values($navigation);
$etag = $this->generateETag($navigation);
if ($this->request->getHeader('If-None-Match') === $etag) {
return new DataResponse([], Http::STATUS_NOT_MODIFIED);
Expand All @@ -77,6 +77,7 @@ public function getSettingsNavigation(bool $absolute = false): DataResponse {
if ($absolute) {
$navigation = $this->rewriteToAbsoluteUrls($navigation);
}
$navigation = array_values($navigation);
$etag = $this->generateETag($navigation);
if ($this->request->getHeader('If-None-Match') === $etag) {
return new DataResponse([], Http::STATUS_NOT_MODIFIED);
Expand Down
2 changes: 1 addition & 1 deletion settings/js/apps.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ OC.Settings.Apps = OC.Settings.Apps || {
if(response.ocs.meta.status === 'ok') {
var addedApps = {};
var navEntries = response.ocs.data;
var container = $('#navigation #apps');
var container = $('#navigation #apps ul');

// remove disabled apps
for (var i = 0; i < navEntries.length; i++) {
Expand Down
4 changes: 2 additions & 2 deletions tests/Core/Controller/NavigationControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function testGetAppNavigation($absolute) {
$this->navigationManager->expects($this->once())
->method('getAll')
->with('link')
->willReturn([ ['id' => 'files', 'href' => '/index.php/apps/files', 'icon' => 'icon' ] ]);
->willReturn(['files' => ['id' => 'files', 'href' => '/index.php/apps/files', 'icon' => 'icon' ] ]);
if ($absolute) {
$this->urlGenerator->expects($this->any())
->method('getBaseURL')
Expand Down Expand Up @@ -102,7 +102,7 @@ public function testGetSettingsNavigation($absolute) {
$this->navigationManager->expects($this->once())
->method('getAll')
->with('settings')
->willReturn([ ['id' => 'settings', 'href' => '/index.php/settings/user', 'icon' => '/core/img/settings.svg'] ]);
->willReturn(['settings' => ['id' => 'settings', 'href' => '/index.php/settings/user', 'icon' => '/core/img/settings.svg'] ]);
if ($absolute) {
$this->urlGenerator->expects($this->any())
->method('getBaseURL')
Expand Down