1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 09:18:48 +02:00

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:
epriestley 2012-03-21 16:58:44 -07:00
parent 5eb922fdb4
commit 620e936cba
2 changed files with 5 additions and 3 deletions

View file

@ -145,7 +145,6 @@ final class DiffusionSymbolController extends DiffusionController {
'',
'',
'',
'n'
));
$table->setNoDataString(
"No matching symbol could be found in any indexed project.");

View file

@ -45,10 +45,13 @@ final class PhabricatorRepositorySymbol extends PhabricatorRepositoryDAO {
}
public function getURI() {
return DiffusionRequest::generateDiffusionURI(
$request = DiffusionRequest::newFromDictionary(
array(
'repository' => $this->getRepository(),
));
return $request->generateURI(
array(
'action' => 'browse',
'callsign' => $this->getRepository()->getCallsign(),
'path' => $this->getPath(),
'line' => $this->getLineNumber(),
));