Differential D12444 Diff 29887 src/applications/search/engine/PhabricatorApplicationSearchEngine.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/search/engine/PhabricatorApplicationSearchEngine.php
Show First 20 Lines • Show All 377 Lines • ▼ Show 20 Lines | protected function readUsersFromRequest( | ||||
$user_type = PhabricatorPHIDConstants::PHID_TYPE_USER; | $user_type = PhabricatorPHIDConstants::PHID_TYPE_USER; | ||||
foreach ($list as $item) { | foreach ($list as $item) { | ||||
$type = phid_get_type($item); | $type = phid_get_type($item); | ||||
if ($type == $user_type) { | if ($type == $user_type) { | ||||
$phids[] = $item; | $phids[] = $item; | ||||
} else if (isset($allow_types[$type])) { | } else if (isset($allow_types[$type])) { | ||||
$phids[] = $item; | $phids[] = $item; | ||||
} else { | } else { | ||||
if (PhabricatorTypeaheadDatasource::isFunctionToken($item)) { | |||||
// If this is a function, pass it through unchanged; we'll evaluate | |||||
// it later. | |||||
$phids[] = $item; | |||||
} else { | |||||
$names[] = $item; | $names[] = $item; | ||||
} | } | ||||
btrahan: maybe look for a terminal ')' instead? | |||||
} | } | ||||
} | |||||
if ($names) { | if ($names) { | ||||
$users = id(new PhabricatorPeopleQuery()) | $users = id(new PhabricatorPeopleQuery()) | ||||
->setViewer($this->requireViewer()) | ->setViewer($this->requireViewer()) | ||||
->withUsernames($names) | ->withUsernames($names) | ||||
->execute(); | ->execute(); | ||||
foreach ($users as $user) { | foreach ($users as $user) { | ||||
$phids[] = $user->getPHID(); | $phids[] = $user->getPHID(); | ||||
▲ Show 20 Lines • Show All 546 Lines • Show Last 20 Lines |
maybe look for a terminal ')' instead?