Page MenuHomePhabricator

D16446.id.diff
No OneTemporary

D16446.id.diff

diff --git a/src/applications/search/typeahead/PhabricatorSearchDocumentTypeDatasource.php b/src/applications/search/typeahead/PhabricatorSearchDocumentTypeDatasource.php
--- a/src/applications/search/typeahead/PhabricatorSearchDocumentTypeDatasource.php
+++ b/src/applications/search/typeahead/PhabricatorSearchDocumentTypeDatasource.php
@@ -30,17 +30,25 @@
PhabricatorSearchApplicationSearchEngine::getIndexableDocumentTypes(
$viewer);
- $icons = mpull(
- PhabricatorPHIDType::getAllTypes(),
- 'getTypeIcon',
+ $phid_types = mpull(PhabricatorPHIDType::getAllTypes(),
+ null,
'getTypeConstant');
$results = array();
foreach ($types as $type => $name) {
+ $type_object = idx($phid_types, $type);
+ if (!$type_object) {
+ continue;
+ }
+ $application_class = $type_object->getPHIDTypeApplicationClass();
+ $application = PhabricatorApplication::getByClass($application_class);
+ $application_name = $application->getName();
+
$results[$type] = id(new PhabricatorTypeaheadResult())
->setPHID($type)
->setName($name)
- ->setIcon(idx($icons, $type));
+ ->addAttribute($application_name)
+ ->setIcon($type_object->getTypeIcon());
}
return $results;

File Metadata

Mime Type
text/plain
Expires
Tue, Mar 18, 2:18 PM (4 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7654966
Default Alt Text
D16446.id.diff (1 KB)

Event Timeline