diff options
author | Lukas Reschke <lukas@owncloud.com> | 2016-03-12 22:29:47 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2016-03-12 22:29:47 +0100 |
commit | 3c06b08c92245ccf20f8121bbb932145602edbe6 (patch) | |
tree | edd2aab76c85cbe2bc09f1017cfe06d5a645d884 | |
parent | 5862a067d9d67d3ef70cb064009f81b47ed15efd (diff) | |
download | nextcloud-server-3c06b08c92245ccf20f8121bbb932145602edbe6.tar.gz nextcloud-server-3c06b08c92245ccf20f8121bbb932145602edbe6.zip |
Use proper URLs for search results
Fixes https://github.com/owncloud/core/issues/23136
-rw-r--r-- | lib/private/search/result/file.php | 10 |
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; |