Move various other callsites away from callsigns
Summary: Ref T4245. These mostly relate to building URIs. Test Plan: Tried to hunt down as many of these in the UI as I could. Some are a bit tricky but they should be low-risk. Reviewers: chad Reviewed By: chad Maniphest Tasks: T4245 Differential Revision: https://secure.phabricator.com/D14933
This commit is contained in:
@@ -86,7 +86,6 @@ abstract class DiffusionController extends PhabricatorController {
|
||||
return $crumb_list;
|
||||
}
|
||||
|
||||
$callsign = $repository->getCallsign();
|
||||
$repository_name = $repository->getName();
|
||||
|
||||
if (!$spec['commit'] && !$spec['tags'] && !$spec['branches']) {
|
||||
@@ -112,17 +111,14 @@ abstract class DiffusionController extends PhabricatorController {
|
||||
$crumb_list[] = $crumb;
|
||||
|
||||
$stable_commit = $drequest->getStableCommit();
|
||||
$commit_name = $repository->formatCommitName($stable_commit);
|
||||
$commit_uri = $repository->getCommitURI($stable_commit);
|
||||
|
||||
if ($spec['tags']) {
|
||||
$crumb = new PHUICrumbView();
|
||||
if ($spec['commit']) {
|
||||
$crumb->setName(
|
||||
pht('Tags for %s', 'r'.$callsign.$stable_commit));
|
||||
$crumb->setHref($drequest->generateURI(
|
||||
array(
|
||||
'action' => 'commit',
|
||||
'commit' => $drequest->getStableCommit(),
|
||||
)));
|
||||
$crumb->setName(pht('Tags for %s', $commit_name));
|
||||
$crumb->setHref($commit_uri);
|
||||
} else {
|
||||
$crumb->setName(pht('Tags'));
|
||||
}
|
||||
@@ -139,8 +135,8 @@ abstract class DiffusionController extends PhabricatorController {
|
||||
|
||||
if ($spec['commit']) {
|
||||
$crumb = id(new PHUICrumbView())
|
||||
->setName("r{$callsign}{$stable_commit}")
|
||||
->setHref("r{$callsign}{$stable_commit}");
|
||||
->setName($commit_name)
|
||||
->setHref($commit_uri);
|
||||
$crumb_list[] = $crumb;
|
||||
return $crumb_list;
|
||||
}
|
||||
@@ -187,7 +183,7 @@ abstract class DiffusionController extends PhabricatorController {
|
||||
protected function getRepositoryControllerURI(
|
||||
PhabricatorRepository $repository,
|
||||
$path) {
|
||||
return $this->getApplicationURI($repository->getCallsign().'/'.$path);
|
||||
return $repository->getPathURI($path);
|
||||
}
|
||||
|
||||
protected function renderPathLinks(DiffusionRequest $drequest, $action) {
|
||||
|
||||
Reference in New Issue
Block a user