Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(files): do not load legacy files app js #40065

Merged
merged 3 commits into from
Sep 27, 2023
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
5 changes: 2 additions & 3 deletions apps/files/lib/Controller/ViewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public function showFile(string $fileid = null): Response {
* @NoCSRFRequired
* @NoAdminRequired
* @UseSession
*
*
* @param string $dir
* @param string $view
* @param string $fileid
Expand Down Expand Up @@ -219,7 +219,6 @@ public function index($dir = '', $view = '', $fileid = null, $fileNotFound = fal
// Load the files we need
\OCP\Util::addInitScript('files', 'init');
\OCP\Util::addStyle('files', 'merged');
\OCP\Util::addScript('files', 'merged-index', 'files');
\OCP\Util::addScript('files', 'main');

$userId = $this->userSession->getUser()->getUID();
Expand Down Expand Up @@ -393,7 +392,7 @@ private function redirectToFile(int $fileId) {
}
return new RedirectResponse($this->urlGenerator->linkToRoute('files.view.indexViewFileid', $params));
}

throw new NotFoundException();
}
}
4 changes: 2 additions & 2 deletions apps/files/src/services/FileInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ export default async function(url) {
})

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

// TODO remove when no more legacy backbone is used
fileInfo.get = (key) => fileInfo[key]
Expand Down
4 changes: 2 additions & 2 deletions dist/files-sidebar.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-sidebar.js.map

Large diffs are not rendered by default.

Loading