From 78689df4d47b03f69b2f045cbe2cd748c9b2eab7 Mon Sep 17 00:00:00 2001 From: epriestley Date: Sun, 9 Oct 2011 18:36:00 -0700 Subject: [PATCH] Fix missing branch component in symbol crossreference URIs. --- .../controller/symbol/DiffusionSymbolController.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/applications/diffusion/controller/symbol/DiffusionSymbolController.php b/src/applications/diffusion/controller/symbol/DiffusionSymbolController.php index cd786670ec..511d17d265 100644 --- a/src/applications/diffusion/controller/symbol/DiffusionSymbolController.php +++ b/src/applications/diffusion/controller/symbol/DiffusionSymbolController.php @@ -111,7 +111,15 @@ class DiffusionSymbolController extends DiffusionController { $repo = idx($repos, $project->getRepositoryID()); if ($repo) { - $href = '/diffusion/'.$repo->getCallsign().'/browse'.$file.'$'.$line; + + $drequest = DiffusionRequest::newFromAphrontRequestDictionary( + array( + 'callsign' => $repo->getCallsign(), + )); + $branch = $drequest->getBranchURIComponent($drequest->getBranch()); + $file = $branch.ltrim($file, '/'); + + $href = '/diffusion/'.$repo->getCallsign().'/browse/'.$file.'$'.$line; if ($request->getBool('jump') && count($symbols) == 1) { // If this is a clickthrough from Differential, just jump them