Skip to content

Commit

Permalink
Use proper URLs for search results
Browse files Browse the repository at this point in the history
Fixes #23136
  • Loading branch information
LukasReschke committed Mar 12, 2016
1 parent 5862a06 commit 3c06b08
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/private/search/result/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,12 @@ public function __construct(FileInfo $data) {
$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;
Expand Down

0 comments on commit 3c06b08

Please sign in to comment.