Differential D21134 Diff 50329 src/applications/owners/typeahead/PhabricatorOwnersPackageDatasource.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/owners/typeahead/PhabricatorOwnersPackageDatasource.php
| Show All 33 Lines | if (preg_match('/^[oO]\d+\z/', $raw_query)) { | ||||
| $query->withNameNgrams($raw_query); | $query->withNameNgrams($raw_query); | ||||
| } | } | ||||
| $packages = $this->executeQuery($query); | $packages = $this->executeQuery($query); | ||||
| foreach ($packages as $package) { | foreach ($packages as $package) { | ||||
| $name = $package->getName(); | $name = $package->getName(); | ||||
| $monogram = $package->getMonogram(); | $monogram = $package->getMonogram(); | ||||
| $results[] = id(new PhabricatorTypeaheadResult()) | $result = id(new PhabricatorTypeaheadResult()) | ||||
| ->setName("{$monogram}: {$name}") | ->setName("{$monogram}: {$name}") | ||||
| ->setURI($package->getURI()) | ->setURI($package->getURI()) | ||||
| ->setPHID($package->getPHID()); | ->setPHID($package->getPHID()); | ||||
| if ($package->isArchived()) { | |||||
| $result->setClosed(pht('Archived')); | |||||
| } | |||||
| $results[] = $result; | |||||
| } | } | ||||
| return $this->filterResultsAgainstTokens($results); | return $this->filterResultsAgainstTokens($results); | ||||
| } | } | ||||
| } | } | ||||