@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update OAuthServer for modern SearchEngine fields

Summary: Ref T7303. Small modernization.

Test Plan:
- Searched by various users.
- Viewed all, reordered, etc.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T7303

Differential Revision: https://secure.phabricator.com/D15606

+16 -26
+16 -26
src/applications/oauthserver/query/PhabricatorOAuthServerClientSearchEngine.php
··· 11 11 return 'PhabricatorOAuthServerApplication'; 12 12 } 13 13 14 - public function buildSavedQueryFromRequest(AphrontRequest $request) { 15 - $saved = new PhabricatorSavedQuery(); 16 - 17 - $saved->setParameter( 18 - 'creatorPHIDs', 19 - $this->readUsersFromRequest($request, 'creators')); 20 - 21 - return $saved; 14 + public function newQuery() { 15 + return id(new PhabricatorOAuthServerClientQuery()); 22 16 } 23 17 24 - public function buildQueryFromSavedQuery(PhabricatorSavedQuery $saved) { 25 - $query = id(new PhabricatorOAuthServerClientQuery()); 18 + protected function buildQueryFromParameters(array $map) { 19 + $query = $this->newQuery(); 26 20 27 - $creator_phids = $saved->getParameter('creatorPHIDs', array()); 28 - if ($creator_phids) { 29 - $query->withCreatorPHIDs($saved->getParameter('creatorPHIDs', array())); 21 + if ($map['creatorPHIDs']) { 22 + $query->withCreatorPHIDs($map['creatorPHIDs']); 30 23 } 31 24 32 25 return $query; 33 26 } 34 27 35 - public function buildSearchForm( 36 - AphrontFormView $form, 37 - PhabricatorSavedQuery $saved_query) { 38 - 39 - $creator_phids = $saved_query->getParameter('creatorPHIDs', array()); 40 - 41 - $form 42 - ->appendControl( 43 - id(new AphrontFormTokenizerControl()) 44 - ->setDatasource(new PhabricatorPeopleDatasource()) 45 - ->setName('creators') 46 - ->setLabel(pht('Creators')) 47 - ->setValue($creator_phids)); 28 + protected function buildCustomSearchFields() { 29 + return array( 30 + id(new PhabricatorUsersSearchField()) 31 + ->setAliases(array('creators')) 32 + ->setKey('creatorPHIDs') 33 + ->setConduitKey('creators') 34 + ->setLabel(pht('Creators')) 35 + ->setDescription( 36 + pht('Search for applications created by particular users.')), 37 + ); 48 38 } 49 39 50 40 protected function getURI($path) {