Skip to content

Commit 5dcefad

Browse files
authored
Merge pull request #40065 from nextcloud/bugfix/files/navigation-api
2 parents 0a20b5d + 360ae11 commit 5dcefad

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

apps/files/lib/Controller/ViewController.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public function showFile(string $fileid = null): Response {
172172
* @NoCSRFRequired
173173
* @NoAdminRequired
174174
* @UseSession
175-
*
175+
*
176176
* @param string $dir
177177
* @param string $view
178178
* @param string $fileid
@@ -219,7 +219,6 @@ public function index($dir = '', $view = '', $fileid = null, $fileNotFound = fal
219219
// Load the files we need
220220
\OCP\Util::addInitScript('files', 'init');
221221
\OCP\Util::addStyle('files', 'merged');
222-
\OCP\Util::addScript('files', 'merged-index', 'files');
223222
\OCP\Util::addScript('files', 'main');
224223

225224
$userId = $this->userSession->getUser()->getUID();
@@ -393,7 +392,7 @@ private function redirectToFile(int $fileId) {
393392
}
394393
return new RedirectResponse($this->urlGenerator->linkToRoute('files.view.indexViewFileid', $params));
395394
}
396-
395+
397396
throw new NotFoundException();
398397
}
399398
}

apps/files/src/services/FileInfo.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ export default async function(url) {
3434
})
3535

3636
// TODO: create new parser or use cdav-lib when available
37-
const file = OCA.Files.App.fileList.filesClient._client.parseMultiStatus(response.data)
37+
const file = OC.Files.getClient()._client.parseMultiStatus(response.data)
3838
// TODO: create new parser or use cdav-lib when available
39-
const fileInfo = OCA.Files.App.fileList.filesClient._parseFileInfo(file[0])
39+
const fileInfo = OC.Files.getClient()._parseFileInfo(file[0])
4040

4141
// TODO remove when no more legacy backbone is used
4242
fileInfo.get = (key) => fileInfo[key]

dist/files-sidebar.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files-sidebar.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)