aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/lib/Controller/ViewController.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/lib/Controller/ViewController.php')
-rw-r--r--apps/files/lib/Controller/ViewController.php14
1 files changed, 7 insertions, 7 deletions
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', '');