Skip to content

Commit

Permalink
[files] new internal link GET param to avoid setting 'openfile' on re…
Browse files Browse the repository at this point in the history
…direct

Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
  • Loading branch information
Julien Veyssier committed Jan 14, 2022
1 parent 6a7b088 commit b67b4b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/files/lib/Controller/ViewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,10 @@ protected function getStorageInfo() {
* @return TemplateResponse|RedirectResponse
* @throws NotFoundException
*/
public function showFile(string $fileid = null): Response {
public function showFile(string $fileid = null, int $openfile = 1): Response {
// This is the entry point from the `/f/{fileid}` URL which is hardcoded in the server.
try {
return $this->redirectToFile($fileid, true);
return $this->redirectToFile($fileid, $openfile !== 0);
} catch (NotFoundException $e) {
return new RedirectResponse($this->urlGenerator->linkToRoute('files.view.index', ['fileNotFound' => true]));
}
Expand Down

0 comments on commit b67b4b1

Please sign in to comment.