Page MenuHomestyx hydra

No OneTemporary

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
@@ -1,47 +1,49 @@
<?php
final class PhabricatorSearchDocumentTypeDatasource
extends PhabricatorTypeaheadDatasource {
public function getBrowseTitle() {
return pht('Browse Document Types');
}
public function getPlaceholderText() {
return pht('Select a document type...');
}
public function getDatasourceApplicationClass() {
return 'PhabricatorSearchApplication';
}
public function loadResults() {
$results = $this->buildResults();
return $this->filterResultsAgainstTokens($results);
}
public function renderTokens(array $values) {
return $this->renderTokensFromResults($this->buildResults(), $values);
}
private function buildResults() {
+ $viewer = $this->getViewer();
$types =
- PhabricatorSearchApplicationSearchEngine::getIndexableDocumentTypes();
+ PhabricatorSearchApplicationSearchEngine::getIndexableDocumentTypes(
+ $viewer);
$icons = mpull(
PhabricatorPHIDType::getAllTypes(),
'getTypeIcon',
'getTypeConstant');
$results = array();
foreach ($types as $type => $name) {
$results[$type] = id(new PhabricatorTypeaheadResult())
->setPHID($type)
->setName($name)
->setIcon(idx($icons, $type));
}
return $results;
}
}

File Metadata

Mime Type
text/x-diff
Expires
Wed, Jul 2, 2:44 AM (1 d, 11 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
164625
Default Alt Text
(1 KB)

Event Timeline