1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 01:08:50 +02:00

Fix pager for tokens given

Summary: Several small bugs here, I just never tested this properly.

Test Plan: Set page size to 2, paged through tokens given.

Reviewers: blc, btrahan, chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5500
This commit is contained in:
epriestley 2013-03-31 12:30:06 -07:00
parent 5e57ac0e9f
commit 52de3c9cf7
2 changed files with 4 additions and 3 deletions

View file

@ -7,11 +7,10 @@ final class PhabricatorTokenGivenController extends PhabricatorTokenController {
$user = $request->getUser();
$pager = id(new AphrontCursorPagerView())
->setURI(new PhutilURI($this->getApplicationURI('/given/')));
->readFromRequest($request);
$tokens_given = id(new PhabricatorTokenGivenQuery())
->setViewer($user)
->setLimit(100)
->executeWithCursorPager($pager);
$handles = array();
@ -53,6 +52,7 @@ final class PhabricatorTokenGivenController extends PhabricatorTokenController {
$list->addItem($item);
}
$list->setPager($pager);
$title = pht('Tokens Given');
@ -65,7 +65,6 @@ final class PhabricatorTokenGivenController extends PhabricatorTokenController {
$nav->selectFilter('given/');
$nav->appendChild($list);
$nav->appendChild($pager);
return $this->buildApplicationPage(
$nav,

View file

@ -61,6 +61,8 @@ final class PhabricatorTokenGivenQuery
$this->tokenPHIDs);
}
$where[] = $this->buildPagingClause($conn_r);
return $this->formatWhereClause($where);
}