@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix transaction queries failing on "withIDs()" after clicking "Show Older"

Summary:
See <https://discourse.phabricator-community.org/t/unhandled-exception-on-show-older-changes/2545/>.

Before T13266, this query got away without having real paging because it used simple ID paging only and results are never actually hidden (today, you can always see all transactions on an object).

Provide `withIDs()` so the new, slightly stricter paging works.

Test Plan: On an object with "Show Older" in the transaction record, clicked the link. Before: exception in paging code (see Discourse link above). After: transactions loaded cleanly.

Reviewers: amckinley, avivey

Reviewed By: avivey

Differential Revision: https://secure.phabricator.com/D20317

+13
+13
src/applications/transactions/query/PhabricatorApplicationTransactionQuery.php
··· 3 3 abstract class PhabricatorApplicationTransactionQuery 4 4 extends PhabricatorCursorPagedPolicyAwareQuery { 5 5 6 + private $ids; 6 7 private $phids; 7 8 private $objectPHIDs; 8 9 private $authorPHIDs; ··· 34 35 } 35 36 36 37 abstract public function getTemplateApplicationTransaction(); 38 + 39 + public function withIDs(array $ids) { 40 + $this->ids = $ids; 41 + return $this; 42 + } 37 43 38 44 public function withPHIDs(array $phids) { 39 45 $this->phids = $phids; ··· 156 162 157 163 protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) { 158 164 $where = parent::buildWhereClauseParts($conn); 165 + 166 + if ($this->ids !== null) { 167 + $where[] = qsprintf( 168 + $conn, 169 + 'x.id IN (%Ld)', 170 + $this->ids); 171 + } 159 172 160 173 if ($this->phids !== null) { 161 174 $where[] = qsprintf(