1
0
Fork 0
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:
epriestley 2018-02-16 11:36:03 -08:00
parent 8796a6036e
commit 6d3177a3bf

View file

@ -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')),
);
}