@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.

Paginate Diffusion history views, respect 'pagesize' parameter.

+22 -3
+18 -1
src/applications/diffusion/controller/history/DiffusionHistoryController.php
··· 20 20 21 21 public function processRequest() { 22 22 $drequest = $this->diffusionRequest; 23 + $request = $this->getRequest(); 24 + 25 + $page_size = $request->getInt('pagesize', 100); 26 + $offset = $request->getInt('page', 0); 23 27 24 28 $history_query = DiffusionHistoryQuery::newFromDiffusionRequest( 25 29 $drequest); 30 + $history_query->setOffset($offset); 31 + $history_query->setLimit($page_size + 1); 32 + $history = $history_query->loadHistory(); 26 33 27 - $history = $history_query->loadHistory(); 34 + $pager = new AphrontPagerView(); 35 + $pager->setPageSize($page_size); 36 + $pager->setOffset($offset); 37 + if (count($history) == $page_size + 1) { 38 + array_pop($history); 39 + $pager->setHasMorePages(true); 40 + } else { 41 + $pager->setHasMorePages(false); 42 + } 43 + $pager->setURI($request->getRequestURI(), 'page'); 28 44 29 45 $content = array(); 30 46 ··· 41 57 42 58 $history_panel = new AphrontPanelView(); 43 59 $history_panel->appendChild($history_table); 60 + $history_panel->appendChild($pager); 44 61 45 62 $content[] = $history_panel; 46 63
+1
src/applications/diffusion/controller/history/__init__.php
··· 9 9 phutil_require_module('phabricator', 'applications/diffusion/controller/base'); 10 10 phutil_require_module('phabricator', 'applications/diffusion/query/history/base'); 11 11 phutil_require_module('phabricator', 'applications/diffusion/view/historytable'); 12 + phutil_require_module('phabricator', 'view/control/pager'); 12 13 phutil_require_module('phabricator', 'view/layout/panel'); 13 14 14 15
+2 -1
src/applications/diffusion/query/history/svn/DiffusionSvnHistoryQuery.php
··· 43 43 'SELECT * FROM %T WHERE repositoryID = %d AND pathID = %d 44 44 AND commitSequence <= %d 45 45 ORDER BY commitSequence DESC 46 - LIMIT %d', 46 + LIMIT %d, %d', 47 47 PhabricatorRepository::TABLE_PATHCHANGE, 48 48 $repository->getID(), 49 49 $path_id, 50 50 $commit ? $commit : 0x7FFFFFFF, 51 + $this->getOffset(), 51 52 $this->getLimit()); 52 53 53 54 $commits = array();
+1 -1
src/applications/people/storage/user/PhabricatorUser.php
··· 34 34 35 35 protected $conduitCertificate; 36 36 37 - protected $preferences = null; 37 + private $preferences = null; 38 38 39 39 public function getProfileImagePHID() { 40 40 return nonempty(