1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 01:08:50 +02:00

Fix cursor paging issue in Given Token query call

Summary:
The "Query" class for Given Token is missing a "withIDs()" method.

`Call to undefined method PhabricatorTokenGivenQuery::withIDs() at [PhabricatorCursorPagedPolicyAwareQuery.php:120]`

Closes T15652

Test Plan: Go to the Token page and pass a URL parameter, such as `/token/given/?after=3`

Reviewers: O1 Blessed Committers, speck

Reviewed By: O1 Blessed Committers, speck

Subscribers: speck, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15652

Differential Revision: https://we.phorge.it/D25455
This commit is contained in:
Andre Klapper 2023-11-05 15:36:10 +01:00
parent ce5e0f3e33
commit dfa15726ea

View file

@ -3,10 +3,16 @@
final class PhabricatorTokenGivenQuery
extends PhabricatorCursorPagedPolicyAwareQuery {
private $ids;
private $authorPHIDs;
private $objectPHIDs;
private $tokenPHIDs;
public function withIDs(array $ids) {
$this->ids = $ids;
return $this;
}
public function withTokenPHIDs(array $token_phids) {
$this->tokenPHIDs = $token_phids;
return $this;
@ -29,6 +35,13 @@ final class PhabricatorTokenGivenQuery
protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) {
$where = parent::buildWhereClauseParts($conn);
if ($this->ids !== null) {
$where[] = qsprintf(
$conn,
'id IN (%Ld)',
$this->ids);
}
if ($this->authorPHIDs !== null) {
$where[] = qsprintf(
$conn,