1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-25 15:00:58 +01:00

Fix missing branch component in symbol crossreference URIs.

This commit is contained in:
epriestley 2011-10-09 18:36:00 -07:00
parent 254f606e89
commit 78689df4d4

View file

@ -111,7 +111,15 @@ class DiffusionSymbolController extends DiffusionController {
$repo = idx($repos, $project->getRepositoryID()); $repo = idx($repos, $project->getRepositoryID());
if ($repo) { 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 ($request->getBool('jump') && count($symbols) == 1) {
// If this is a clickthrough from Differential, just jump them // If this is a clickthrough from Differential, just jump them