From 7f7c3acfac92f91182b5abb0c9610a752c5cf1cf Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Wed, 24 Aug 2016 19:10:04 -0400 Subject: [PATCH] Remove unused apps from the DocumentType typeahead Summary: Ref T10951. This diff removes uninstalled applications from the result set for DocumentType restults Test Plan: Uninstall an application (diviner for example), then go to the document type search menu and ensure that the uninstalled application doesn't show up. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley Maniphest Tasks: T10951 Differential Revision: https://secure.phabricator.com/D16445 --- .../typeahead/PhabricatorSearchDocumentTypeDatasource.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/applications/search/typeahead/PhabricatorSearchDocumentTypeDatasource.php b/src/applications/search/typeahead/PhabricatorSearchDocumentTypeDatasource.php index 407ab1cad4..860620023c 100644 --- a/src/applications/search/typeahead/PhabricatorSearchDocumentTypeDatasource.php +++ b/src/applications/search/typeahead/PhabricatorSearchDocumentTypeDatasource.php @@ -25,8 +25,10 @@ final class PhabricatorSearchDocumentTypeDatasource } private function buildResults() { + $viewer = $this->getViewer(); $types = - PhabricatorSearchApplicationSearchEngine::getIndexableDocumentTypes(); + PhabricatorSearchApplicationSearchEngine::getIndexableDocumentTypes( + $viewer); $icons = mpull( PhabricatorPHIDType::getAllTypes(),