@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 issue when paging Applications

Summary: See <https://github.com/facebook/phabricator/issues/450>.

Test Plan: See GitHub issue.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

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

+15 -1
+10 -1
src/applications/search/controller/PhabricatorApplicationSearchController.php
··· 198 198 199 199 $pager = new AphrontCursorPagerView(); 200 200 $pager->readFromRequest($request); 201 - $pager->setPageSize($engine->getPageSize($saved_query)); 201 + $page_size = $engine->getPageSize($saved_query); 202 + if (is_finite($page_size)) { 203 + $pager->setPageSize($page_size); 204 + } else { 205 + // Consider an INF pagesize to mean a large finite pagesize. 206 + 207 + // TODO: It would be nice to handle this more gracefully, but math 208 + // with INF seems to vary across PHP versions, systems, and runtimes. 209 + $pager->setPageSize(0xFFFF); 210 + } 202 211 $objects = $query->setViewer($request->getUser()) 203 212 ->executeWithCursorPager($pager); 204 213
+5
src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php
··· 19 19 } 20 20 21 21 protected function getPagingValue($result) { 22 + if (!is_object($result)) { 23 + // This interface can't be typehinted and PHP gets really angry if we 24 + // call a method on a non-object, so add an explicit check here. 25 + throw new Exception(pht('Expected object, got "%s"!', gettype($result))); 26 + } 22 27 return $result->getID(); 23 28 } 24 29