1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 14:00:56 +01:00

Fix a bad link target in Diffusion content search results

Summary: See <https://discourse.phabricator-community.org/t/broken-links-in-diffusion-pattern-search-results-page/757>. This links to the display path, which is incorrect.

Test Plan:
  - In any repository, browsed into a directory.
  - Used pattern search to search for something that hits results.
  - Clicked the title (filename/path) of a result table.
    - Before patch: URL omits path context, 404 or wrong result.
    - After patch: taken to proper page.

Reviewers: amckinley

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D18779
This commit is contained in:
epriestley 2017-11-22 07:52:20 -08:00
parent 1cb0d41367
commit 2d4a158356

View file

@ -96,10 +96,11 @@ final class DiffusionPatternSearchView extends DiffusionView {
$path_title = Filesystem::readablePath($this->path, $drequest->getPath());
$href = $drequest->generateURI(array(
'action' => 'browse',
'path' => $path_title,
));
$href = $drequest->generateURI(
array(
'action' => 'browse',
'path' => $this->path,
));
$title = phutil_tag('a', array('href' => $href), $path_title);