aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-03-14 16:11:17 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-03-14 16:11:17 +0100
commitf6a5fe452d4ba8be7fefafd9c31409b88acc2b04 (patch)
tree574b833e31cc8739f7d50bbfca9adbb2fa48978a /lib
parentd21928496171fb167a8d11610e4c107deccbb5f5 (diff)
parent3c06b08c92245ccf20f8121bbb932145602edbe6 (diff)
downloadnextcloud-server-f6a5fe452d4ba8be7fefafd9c31409b88acc2b04.tar.gz
nextcloud-server-f6a5fe452d4ba8be7fefafd9c31409b88acc2b04.zip
Merge pull request #23190 from owncloud/use-proper-url-for-search-results
Use proper URLs for search results
Diffstat (limited to 'lib')
-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;