Differential D12528 Diff 30088 src/applications/typeahead/controller/PhabricatorTypeaheadModularDatasourceController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/typeahead/controller/PhabricatorTypeaheadModularDatasourceController.php
Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | if (isset($sources[$class])) { | ||||
} | } | ||||
$results = $composite->loadResults(); | $results = $composite->loadResults(); | ||||
if ($is_browse) { | if ($is_browse) { | ||||
// If this is a request for a specific token after the user clicks | // If this is a request for a specific token after the user clicks | ||||
// "Select", return the token in wire format so it can be added to | // "Select", return the token in wire format so it can be added to | ||||
// the tokenizer. | // the tokenizer. | ||||
if ($select_phid) { | if ($select_phid !== null) { | ||||
$map = mpull($results, null, 'getPHID'); | $map = mpull($results, null, 'getPHID'); | ||||
$token = idx($map, $select_phid); | $token = idx($map, $select_phid); | ||||
if (!$token) { | if (!$token) { | ||||
return new Aphront404Response(); | return new Aphront404Response(); | ||||
} | } | ||||
$payload = array( | $payload = array( | ||||
'key' => $token->getPHID(), | 'key' => $token->getPHID(), | ||||
▲ Show 20 Lines • Show All 258 Lines • Show Last 20 Lines |