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

Modernize ProjectQuery paging/ordering

Summary: Ref T7803. Move ProjectQuery off getReversePaging() / getPagingColumn() and onto order vectors.

Test Plan: Set project page size to 3 and paged back and forth.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7803

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

+20 -6
+20 -6
src/applications/project/query/PhabricatorProjectQuery.php
··· 95 95 return $this; 96 96 } 97 97 98 - protected function getPagingColumn() { 99 - return 'name'; 98 + protected function getDefaultOrderVector() { 99 + return array('name'); 100 100 } 101 101 102 - protected function getPagingValue($result) { 103 - return $result->getName(); 102 + public function getOrderableColumns() { 103 + return array( 104 + 'name' => array( 105 + 'table' => $this->getPrimaryTableAlias(), 106 + 'column' => 'name', 107 + 'reverse' => true, 108 + 'type' => 'string', 109 + 'unique' => true, 110 + ), 111 + ); 104 112 } 105 113 106 - protected function getReversePaging() { 107 - return true; 114 + protected function getPagingValueMap($cursor, array $keys) { 115 + return array( 116 + 'name' => $cursor, 117 + ); 118 + } 119 + 120 + protected function getPagingValue($result) { 121 + return $result->getName(); 108 122 } 109 123 110 124 protected function loadPage() {