diff options
author | John Molakvoæ <skjnldsv@protonmail.com> | 2022-12-28 19:08:54 +0100 |
---|---|---|
committer | John Molakvoæ <skjnldsv@protonmail.com> | 2023-01-04 16:46:16 +0100 |
commit | 0a3ef8b74bffc9b1cb6ef21695037d52aabd3ee1 (patch) | |
tree | 673c1fa994320800bfceb33eb45299137c15488d /apps/files/lib/Controller | |
parent | 5b9a8f0407a9e3fe7e00f0fc9284ea986905f1b5 (diff) | |
download | nextcloud-server-0a3ef8b74bffc9b1cb6ef21695037d52aabd3ee1.tar.gz nextcloud-server-0a3ef8b74bffc9b1cb6ef21695037d52aabd3ee1.zip |
Fixing tests
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files/lib/Controller')
-rw-r--r-- | apps/files/lib/Controller/ApiController.php | 2 | ||||
-rw-r--r-- | apps/files/lib/Controller/ViewController.php | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/apps/files/lib/Controller/ApiController.php b/apps/files/lib/Controller/ApiController.php index 76597b7a018..f2329fc384b 100644 --- a/apps/files/lib/Controller/ApiController.php +++ b/apps/files/lib/Controller/ApiController.php @@ -289,7 +289,7 @@ class ApiController extends Controller { * @param string|bool $value * @return JSONResponse */ - public function setConfig(string $key, string|bool $value): JSONResponse { + public function setConfig(string $key, $value): JSONResponse { try { $this->userConfig->setConfig($key, (string)$value); } catch (\InvalidArgumentException $e) { diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php index 4e81b630bab..ea589807767 100644 --- a/apps/files/lib/Controller/ViewController.php +++ b/apps/files/lib/Controller/ViewController.php @@ -175,13 +175,13 @@ class ViewController extends Controller { */ public function index($dir = '', $view = '', $fileid = null, $fileNotFound = false, $openfile = null) { - // if ($fileid !== null && $dir === '') { - // try { - // return $this->redirectToFile($fileid); - // } catch (NotFoundException $e) { - // return new RedirectResponse($this->urlGenerator->linkToRoute('files.view.index', ['fileNotFound' => true])); - // } - // } + if ($fileid !== null && $dir === '') { + try { + return $this->redirectToFile($fileid); + } catch (NotFoundException $e) { + return new RedirectResponse($this->urlGenerator->linkToRoute('files.view.index', ['fileNotFound' => true])); + } + } $nav = new \OCP\Template('files', 'appnavigation', ''); |