Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14737646
D15606.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D15606.diff
View Options
diff --git a/src/applications/oauthserver/query/PhabricatorOAuthServerClientSearchEngine.php b/src/applications/oauthserver/query/PhabricatorOAuthServerClientSearchEngine.php
--- a/src/applications/oauthserver/query/PhabricatorOAuthServerClientSearchEngine.php
+++ b/src/applications/oauthserver/query/PhabricatorOAuthServerClientSearchEngine.php
@@ -11,40 +11,30 @@
return 'PhabricatorOAuthServerApplication';
}
- public function buildSavedQueryFromRequest(AphrontRequest $request) {
- $saved = new PhabricatorSavedQuery();
-
- $saved->setParameter(
- 'creatorPHIDs',
- $this->readUsersFromRequest($request, 'creators'));
-
- return $saved;
+ public function newQuery() {
+ return id(new PhabricatorOAuthServerClientQuery());
}
- public function buildQueryFromSavedQuery(PhabricatorSavedQuery $saved) {
- $query = id(new PhabricatorOAuthServerClientQuery());
+ protected function buildQueryFromParameters(array $map) {
+ $query = $this->newQuery();
- $creator_phids = $saved->getParameter('creatorPHIDs', array());
- if ($creator_phids) {
- $query->withCreatorPHIDs($saved->getParameter('creatorPHIDs', array()));
+ if ($map['creatorPHIDs']) {
+ $query->withCreatorPHIDs($map['creatorPHIDs']);
}
return $query;
}
- public function buildSearchForm(
- AphrontFormView $form,
- PhabricatorSavedQuery $saved_query) {
-
- $creator_phids = $saved_query->getParameter('creatorPHIDs', array());
-
- $form
- ->appendControl(
- id(new AphrontFormTokenizerControl())
- ->setDatasource(new PhabricatorPeopleDatasource())
- ->setName('creators')
- ->setLabel(pht('Creators'))
- ->setValue($creator_phids));
+ protected function buildCustomSearchFields() {
+ return array(
+ id(new PhabricatorUsersSearchField())
+ ->setAliases(array('creators'))
+ ->setKey('creatorPHIDs')
+ ->setConduitKey('creators')
+ ->setLabel(pht('Creators'))
+ ->setDescription(
+ pht('Search for applications created by particular users.')),
+ );
}
protected function getURI($path) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 20, 8:28 AM (20 h, 47 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7022536
Default Alt Text
D15606.diff (2 KB)
Attached To
Mode
D15606: Update OAuthServer for modern SearchEngine fields
Attached
Detach File
Event Timeline
Log In to Comment