mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-30 02:32:42 +01:00
Don't require working copy to generate URIs in owners tool
Summary: Owners packages might include repositories that are no longer tracked (or checked out locally), and there's no reason why we need a working copy to generate a diffusion link. Instead of displaying a red error box, this diff allows the owners tool to render correctly. Test Plan: viewed /owners/view/all/ and /owners/package/395/ and verified no error box for not having a checkout of the repository. Reviewers: epriestley, vrana, wez Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D3452
This commit is contained in:
parent
90b60bc3c9
commit
ab01ef562e
2 changed files with 6 additions and 12 deletions
|
@ -98,13 +98,10 @@ final class PhabricatorOwnersDetailController
|
||||||
$path_links = array();
|
$path_links = array();
|
||||||
foreach ($paths as $path) {
|
foreach ($paths as $path) {
|
||||||
$repo = $repositories[$path->getRepositoryPHID()];
|
$repo = $repositories[$path->getRepositoryPHID()];
|
||||||
$drequest = DiffusionRequest::newFromDictionary(
|
$href = DiffusionRequest::generateDiffusionURI(
|
||||||
array(
|
array(
|
||||||
'repository' => $repo,
|
'callsign' => $repo->getCallsign(),
|
||||||
'path' => $path->getPath(),
|
'path' => $path->getPath(),
|
||||||
));
|
|
||||||
$href = $drequest->generateURI(
|
|
||||||
array(
|
|
||||||
'action' => 'browse'
|
'action' => 'browse'
|
||||||
));
|
));
|
||||||
$repo_name = '<strong>'.phutil_escape_html($repo->getName()).
|
$repo_name = '<strong>'.phutil_escape_html($repo->getName()).
|
||||||
|
|
|
@ -262,14 +262,11 @@ final class PhabricatorOwnersListController
|
||||||
foreach ($pkg_paths as $key => $path) {
|
foreach ($pkg_paths as $key => $path) {
|
||||||
$repo = $repositories[$path->getRepositoryPHID()];
|
$repo = $repositories[$path->getRepositoryPHID()];
|
||||||
if ($repo) {
|
if ($repo) {
|
||||||
$drequest = DiffusionRequest::newFromDictionary(
|
$href = DiffusionRequest::generateDiffusionURI(
|
||||||
array(
|
array(
|
||||||
'repository' => $repo,
|
'callsign' => $repo->getCallsign(),
|
||||||
'path' => $path->getPath(),
|
'path' => $path->getPath(),
|
||||||
));
|
'action' => 'browse',
|
||||||
$href = $drequest->generateURI(
|
|
||||||
array(
|
|
||||||
'action' => 'browse',
|
|
||||||
));
|
));
|
||||||
$pkg_paths[$key] =
|
$pkg_paths[$key] =
|
||||||
'<strong>'.phutil_escape_html($repo->getName()).'</strong> '.
|
'<strong>'.phutil_escape_html($repo->getName()).'</strong> '.
|
||||||
|
|
Loading…
Reference in a new issue