Implement generalized application search in Macros
Summary: Ref T2625. Works out the last kinks of generalization and gives Macros the more powerful new query engine. Overall, this feels pretty good to me. Test Plan: Executed, saved and edited a bunch of Macro queries. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T2625 Differential Revision: https://secure.phabricator.com/D6078
This commit is contained in:
@@ -20,14 +20,6 @@ final class PhabricatorPasteSearchEngine
|
||||
'authorPHIDs',
|
||||
array_values($request->getArr('authors')));
|
||||
|
||||
try {
|
||||
$unguarded = AphrontWriteGuard::beginScopedUnguardedWrites();
|
||||
$saved->save();
|
||||
unset($unguarded);
|
||||
} catch (AphrontQueryDuplicateKeyException $ex) {
|
||||
// Ignore, this is just a repeated search.
|
||||
}
|
||||
|
||||
return $saved;
|
||||
}
|
||||
|
||||
@@ -39,6 +31,7 @@ final class PhabricatorPasteSearchEngine
|
||||
*/
|
||||
public function buildQueryFromSavedQuery(PhabricatorSavedQuery $saved) {
|
||||
$query = id(new PhabricatorPasteQuery())
|
||||
->needContent(true)
|
||||
->withIDs($saved->getParameter('ids', array()))
|
||||
->withPHIDs($saved->getParameter('phids', array()))
|
||||
->withAuthorPHIDs($saved->getParameter('authorPHIDs', array()))
|
||||
|
||||
Reference in New Issue
Block a user