aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/search/result/file.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/private/search/result/file.php b/lib/private/search/result/file.php
index d987d6c8e73..f1347001eaf 100644
--- a/lib/private/search/result/file.php
+++ b/lib/private/search/result/file.php
@@ -79,10 +79,12 @@ class File extends \OCP\Search\Result {
$info = pathinfo($path);
$this->id = $data->getId();
$this->name = $info['basename'];
- $this->link = \OCP\Util::linkTo(
- 'files',
- 'index.php',
- array('dir' => $info['dirname'], 'scrollto' => $info['basename'])
+ $this->link = \OC::$server->getURLGenerator()->linkToRoute(
+ 'files.view.index',
+ [
+ 'dir' => $info['dirname'],
+ 'scrollto' => $info['basename'],
+ ]
);
$this->permissions = $data->getPermissions();
$this->path = $path;