Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/query/PhabricatorPeopleSearchEngine.php
Show First 20 Lines • Show All 159 Lines • ▼ Show 20 Lines | final class PhabricatorPeopleSearchEngine | ||||
} | } | ||||
protected function getURI($path) { | protected function getURI($path) { | ||||
return '/people/'.$path; | return '/people/'.$path; | ||||
} | } | ||||
protected function getBuiltinQueryNames() { | protected function getBuiltinQueryNames() { | ||||
$names = array( | $names = array( | ||||
'active' => pht('Active'), | |||||
'all' => pht('All'), | 'all' => pht('All'), | ||||
); | ); | ||||
$viewer = $this->requireViewer(); | $viewer = $this->requireViewer(); | ||||
if ($viewer->getIsAdmin()) { | if ($viewer->getIsAdmin()) { | ||||
$names['approval'] = pht('Approval Queue'); | $names['approval'] = pht('Approval Queue'); | ||||
} | } | ||||
return $names; | return $names; | ||||
} | } | ||||
public function buildSavedQueryFromBuiltin($query_key) { | public function buildSavedQueryFromBuiltin($query_key) { | ||||
$query = $this->newSavedQuery(); | $query = $this->newSavedQuery(); | ||||
$query->setQueryKey($query_key); | $query->setQueryKey($query_key); | ||||
switch ($query_key) { | switch ($query_key) { | ||||
case 'active': | |||||
return $query | |||||
->setParameter('noDisabled', true); | |||||
case 'all': | case 'all': | ||||
return $query; | return $query; | ||||
case 'approval': | case 'approval': | ||||
return $query | return $query | ||||
->setParameter('needsApproval', true) | ->setParameter('needsApproval', true) | ||||
->setParameter('noDisabled', true); | ->setParameter('noDisabled', true); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 79 Lines • Show Last 20 Lines |