From be2a0f873368d7f318fce16ddf96077e755a47bd Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 24 Sep 2019 08:33:18 -0700 Subject: [PATCH] Fix a cursor paging issue in Conduit call logs Summary: Fixes T13423. The "Query" class for conduit call logs is missing a "withIDs()" method. Test Plan: Paged through Conduit call logs. Maniphest Tasks: T13423 Differential Revision: https://secure.phabricator.com/D20823 --- .../conduit/query/PhabricatorConduitLogQuery.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/applications/conduit/query/PhabricatorConduitLogQuery.php b/src/applications/conduit/query/PhabricatorConduitLogQuery.php index 6f0f6131d8..23a5b46786 100644 --- a/src/applications/conduit/query/PhabricatorConduitLogQuery.php +++ b/src/applications/conduit/query/PhabricatorConduitLogQuery.php @@ -3,12 +3,18 @@ final class PhabricatorConduitLogQuery extends PhabricatorCursorPagedPolicyAwareQuery { + private $ids; private $callerPHIDs; private $methods; private $methodStatuses; private $epochMin; private $epochMax; + public function withIDs(array $ids) { + $this->ids = $ids; + return $this; + } + public function withCallerPHIDs(array $phids) { $this->callerPHIDs = $phids; return $this; @@ -41,6 +47,13 @@ final class PhabricatorConduitLogQuery protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) { $where = parent::buildWhereClauseParts($conn); + if ($this->ids !== null) { + $where[] = qsprintf( + $conn, + 'id IN (%Ld)', + $this->ids); + } + if ($this->callerPHIDs !== null) { $where[] = qsprintf( $conn,