瀏覽代碼

[files] new internal link GET param to avoid setting 'openfile' on redirect

Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
tags/v24.0.0beta1
Julien Veyssier 2 年之前
父節點
當前提交
b67b4b160b
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 2 行新增2 行删除
  1. 2
    2
      apps/files/lib/Controller/ViewController.php

+ 2
- 2
apps/files/lib/Controller/ViewController.php 查看文件

@@ -162,10 +162,10 @@ class ViewController extends Controller {
* @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]));
}

Loading…
取消
儲存