1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 16: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:
Brecht Van Lommel 2013-11-11 09:12:08 -08:00 committed by epriestley
parent 71adee75b0
commit 7ec42dbbea

View file

@ -104,6 +104,8 @@ abstract class DiffusionBrowseController extends DiffusionController {
// TODO: Ideally, this should live in Owners and be event-triggered, but // TODO: Ideally, this should live in Owners and be event-triggered, but
// there's no reasonable object for it to react to right now. // there's no reasonable object for it to react to right now.
$owners = 'PhabricatorApplicationOwners';
if (PhabricatorApplication::isClassInstalled($owners)) {
$owners_uri = id(new PhutilURI('/owners/view/search/')) $owners_uri = id(new PhutilURI('/owners/view/search/'))
->setQueryParams( ->setQueryParams(
array( array(
@ -116,6 +118,7 @@ abstract class DiffusionBrowseController extends DiffusionController {
->setName(pht('Find Owners')) ->setName(pht('Find Owners'))
->setHref((string)$owners_uri) ->setHref((string)$owners_uri)
->setIcon('preview')); ->setIcon('preview'));
}
return $view; return $view;
} }