mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 06:42:42 +01: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:
parent
ce5e0f3e33
commit
dfa15726ea
1 changed files with 13 additions and 0 deletions
|
@ -3,10 +3,16 @@
|
||||||
final class PhabricatorTokenGivenQuery
|
final class PhabricatorTokenGivenQuery
|
||||||
extends PhabricatorCursorPagedPolicyAwareQuery {
|
extends PhabricatorCursorPagedPolicyAwareQuery {
|
||||||
|
|
||||||
|
private $ids;
|
||||||
private $authorPHIDs;
|
private $authorPHIDs;
|
||||||
private $objectPHIDs;
|
private $objectPHIDs;
|
||||||
private $tokenPHIDs;
|
private $tokenPHIDs;
|
||||||
|
|
||||||
|
public function withIDs(array $ids) {
|
||||||
|
$this->ids = $ids;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function withTokenPHIDs(array $token_phids) {
|
public function withTokenPHIDs(array $token_phids) {
|
||||||
$this->tokenPHIDs = $token_phids;
|
$this->tokenPHIDs = $token_phids;
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -29,6 +35,13 @@ final class PhabricatorTokenGivenQuery
|
||||||
protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) {
|
protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) {
|
||||||
$where = parent::buildWhereClauseParts($conn);
|
$where = parent::buildWhereClauseParts($conn);
|
||||||
|
|
||||||
|
if ($this->ids !== null) {
|
||||||
|
$where[] = qsprintf(
|
||||||
|
$conn,
|
||||||
|
'id IN (%Ld)',
|
||||||
|
$this->ids);
|
||||||
|
}
|
||||||
|
|
||||||
if ($this->authorPHIDs !== null) {
|
if ($this->authorPHIDs !== null) {
|
||||||
$where[] = qsprintf(
|
$where[] = qsprintf(
|
||||||
$conn,
|
$conn,
|
||||||
|
|
Loading…
Reference in a new issue