mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +01:00
Fix 404 clicking Find Owners in diffusion, if Owners application is disabled.
Test Plan: Install/uninstall Owners application, Find Owners action shown/hidden as expected. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley CC: Korvin, epriestley, aran Differential Revision: https://secure.phabricator.com/D7557
This commit is contained in:
parent
71adee75b0
commit
7ec42dbbea
1 changed files with 14 additions and 11 deletions
|
@ -104,18 +104,21 @@ abstract class DiffusionBrowseController extends DiffusionController {
|
|||
// TODO: Ideally, this should live in Owners and be event-triggered, but
|
||||
// there's no reasonable object for it to react to right now.
|
||||
|
||||
$owners_uri = id(new PhutilURI('/owners/view/search/'))
|
||||
->setQueryParams(
|
||||
array(
|
||||
'repository' => $drequest->getCallsign(),
|
||||
'path' => '/'.$drequest->getPath(),
|
||||
));
|
||||
$owners = 'PhabricatorApplicationOwners';
|
||||
if (PhabricatorApplication::isClassInstalled($owners)) {
|
||||
$owners_uri = id(new PhutilURI('/owners/view/search/'))
|
||||
->setQueryParams(
|
||||
array(
|
||||
'repository' => $drequest->getCallsign(),
|
||||
'path' => '/'.$drequest->getPath(),
|
||||
));
|
||||
|
||||
$view->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('Find Owners'))
|
||||
->setHref((string)$owners_uri)
|
||||
->setIcon('preview'));
|
||||
$view->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('Find Owners'))
|
||||
->setHref((string)$owners_uri)
|
||||
->setIcon('preview'));
|
||||
}
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue