Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/typeahead/PhabricatorProjectDatasource.php
Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | foreach ($projs as $proj) { | ||||
$closed = null; | $closed = null; | ||||
if ($proj->isArchived()) { | if ($proj->isArchived()) { | ||||
$closed = pht('Archived'); | $closed = pht('Archived'); | ||||
} | } | ||||
$all_strings = array(); | $all_strings = array(); | ||||
$all_strings[] = $proj->getDisplayName(); | $all_strings[] = $proj->getDisplayName(); | ||||
// Add an extra space after the name so that the original project | |||||
// sorts ahead of milestones. This is kind of a hack but ehh? | |||||
$all_strings[] = null; | |||||
foreach ($proj->getSlugs() as $project_slug) { | foreach ($proj->getSlugs() as $project_slug) { | ||||
$all_strings[] = $project_slug->getSlug(); | $all_strings[] = $project_slug->getSlug(); | ||||
} | } | ||||
$all_strings = implode(' ', $all_strings); | $all_strings = implode(' ', $all_strings); | ||||
$proj_result = id(new PhabricatorTypeaheadResult()) | $proj_result = id(new PhabricatorTypeaheadResult()) | ||||
->setName($all_strings) | ->setName($all_strings) | ||||
->setDisplayName($proj->getDisplayName()) | ->setDisplayName($proj->getDisplayName()) | ||||
Show All 21 Lines |