mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 22:10:55 +01:00
Allow "phriction.document.search" to query by path
Summary: Ref T13077. Adds a "paths" constraint to the API query. Test Plan: Used paths constraint to fetch documents. Maniphest Tasks: T13077 Differential Revision: https://secure.phabricator.com/D19112
This commit is contained in:
parent
8796a6036e
commit
6d3177a3bf
1 changed files with 8 additions and 0 deletions
|
@ -23,6 +23,10 @@ final class PhrictionDocumentSearchEngine
|
|||
$query->withStatuses($map['statuses']);
|
||||
}
|
||||
|
||||
if ($map['paths']) {
|
||||
$query->withSlugs($map['paths']);
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
|
@ -32,6 +36,10 @@ final class PhrictionDocumentSearchEngine
|
|||
->setKey('statuses')
|
||||
->setLabel(pht('Status'))
|
||||
->setOptions(PhrictionDocumentStatus::getStatusMap()),
|
||||
id(new PhabricatorSearchStringListField())
|
||||
->setKey('paths')
|
||||
->setIsHidden(true)
|
||||
->setLabel(pht('Paths')),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue