mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01: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:
parent
5e57ac0e9f
commit
52de3c9cf7
2 changed files with 4 additions and 3 deletions
|
@ -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,
|
||||
|
|
|
@ -61,6 +61,8 @@ final class PhabricatorTokenGivenQuery
|
|||
$this->tokenPHIDs);
|
||||
}
|
||||
|
||||
$where[] = $this->buildPagingClause($conn_r);
|
||||
|
||||
return $this->formatWhereClause($where);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue