Fix symbol URI generation to include default branch name for relevant repositories
Summary: We need to build a request in order to pick up an appropriate default branch name, instead of using the raw static generator. Test Plan: Clicked a symbol link, got /master/path/blahblah Reviewers: vrana, btrahan Reviewed By: vrana CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D1982
This commit is contained in:
parent
5eb922fdb4
commit
620e936cba
|
@ -145,7 +145,6 @@ final class DiffusionSymbolController extends DiffusionController {
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
'n'
|
|
||||||
));
|
));
|
||||||
$table->setNoDataString(
|
$table->setNoDataString(
|
||||||
"No matching symbol could be found in any indexed project.");
|
"No matching symbol could be found in any indexed project.");
|
||||||
|
|
|
@ -45,10 +45,13 @@ final class PhabricatorRepositorySymbol extends PhabricatorRepositoryDAO {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getURI() {
|
public function getURI() {
|
||||||
return DiffusionRequest::generateDiffusionURI(
|
$request = DiffusionRequest::newFromDictionary(
|
||||||
|
array(
|
||||||
|
'repository' => $this->getRepository(),
|
||||||
|
));
|
||||||
|
return $request->generateURI(
|
||||||
array(
|
array(
|
||||||
'action' => 'browse',
|
'action' => 'browse',
|
||||||
'callsign' => $this->getRepository()->getCallsign(),
|
|
||||||
'path' => $this->getPath(),
|
'path' => $this->getPath(),
|
||||||
'line' => $this->getLineNumber(),
|
'line' => $this->getLineNumber(),
|
||||||
));
|
));
|
||||||
|
|
Loading…
Reference in a new issue