Modernize Phriction ordering/paging

Summary: Ref T7803. Fixes T7809. Move Phriction away from getReversePaging() / getPagingColumn().

Test Plan: Paged "All Documents", "Updated", and viewed document hierarchy.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: ite-klass, epriestley

Maniphest Tasks: T7809, T7803

Differential Revision: https://secure.phabricator.com/D12360
This commit is contained in:
epriestley
2015-04-11 19:58:18 -07:00
parent 8bd1ab9d13
commit e0fa0fbdee
4 changed files with 80 additions and 50 deletions

View File

@@ -249,6 +249,8 @@ abstract class PhabricatorCursorPagedPolicyAwareQuery
->setViewer($this->getPagingViewer())
->withIDs(array((int)$cursor));
$this->willExecuteCursorQuery($query);
$object = $query->executeOne();
if (!$object) {
throw new Exception(
@@ -260,6 +262,11 @@ abstract class PhabricatorCursorPagedPolicyAwareQuery
return $object;
}
protected function willExecuteCursorQuery(
PhabricatorCursorPagedPolicyAwareQuery $query) {
return;
}
/**
* Simplifies the task of constructing a paging clause across multiple
@@ -446,7 +453,7 @@ abstract class PhabricatorCursorPagedPolicyAwareQuery
/**
* @task order
*/
private function getOrderVector() {
protected function getOrderVector() {
if (!$this->orderVector) {
$vector = $this->getDefaultOrderVector();
$vector = PhabricatorQueryOrderVector::newFromVector($vector);