mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +01:00
Hide "Packages" field in Diffusion Commits query form when application uninstalled
Summary: Fixes T15698 Test Plan: 1. Uninstall Packages via `/applications/view/PhabricatorPackagesApplication/` 2. Go to `/diffusion/commit/`, expand the Query form, and see that `Packages` is not shown anymore Reviewers: O1 Blessed Committers, 20after4 Reviewed By: O1 Blessed Committers, 20after4 Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Maniphest Tasks: T15698 Differential Revision: https://we.phorge.it/D25506
This commit is contained in:
parent
428f9686c4
commit
d92ed9ce0c
1 changed files with 3 additions and 0 deletions
|
@ -70,6 +70,8 @@ final class PhabricatorCommitSearchEngine
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function buildCustomSearchFields() {
|
protected function buildCustomSearchFields() {
|
||||||
|
$show_packages = PhabricatorApplication::isClassInstalled(
|
||||||
|
'PhabricatorPackagesApplication');
|
||||||
return array(
|
return array(
|
||||||
id(new PhabricatorSearchDatasourceField())
|
id(new PhabricatorSearchDatasourceField())
|
||||||
->setLabel(pht('Responsible Users'))
|
->setLabel(pht('Responsible Users'))
|
||||||
|
@ -118,6 +120,7 @@ final class PhabricatorCommitSearchEngine
|
||||||
->setConduitKey('packages')
|
->setConduitKey('packages')
|
||||||
->setAliases(array('package', 'packages', 'packagePHID'))
|
->setAliases(array('package', 'packages', 'packagePHID'))
|
||||||
->setDatasource(new PhabricatorOwnersPackageDatasource())
|
->setDatasource(new PhabricatorOwnersPackageDatasource())
|
||||||
|
->setIsHidden(!$show_packages)
|
||||||
->setDescription(
|
->setDescription(
|
||||||
pht('Find commits which affect given packages.')),
|
pht('Find commits which affect given packages.')),
|
||||||
id(new PhabricatorSearchThreeStateField())
|
id(new PhabricatorSearchThreeStateField())
|
||||||
|
|
Loading…
Reference in a new issue