Skip to content

Commit

Permalink
Ldap\Query: Remove method paginate()
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Meyer committed May 19, 2015
1 parent 3296522 commit 73e8c51
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions library/Icinga/Protocol/Ldap/Query.php
Expand Up @@ -281,31 +281,6 @@ public function getSortColumns()
return $this->sort_columns;
}

/**
* Return a pagination adapter for the current query
*
* @return \Zend_Paginator
*/
public function paginate($limit = null, $page = null)
{
if ($page === null || $limit === null) {
$request = \Zend_Controller_Front::getInstance()->getRequest();
if ($page === null) {
$page = $request->getParam('page', 0);
}
if ($limit === null) {
$limit = $request->getParam('limit', 20);
}
}
$paginator = new \Zend_Paginator(
// TODO: Adapter doesn't fit yet:
new \Icinga\Web\Paginator\Adapter\QueryAdapter($this)
);
$paginator->setItemCountPerPage($limit);
$paginator->setCurrentPageNumber($page);
return $paginator;
}

/**
* Add a filter expression to this query
*
Expand Down

0 comments on commit 73e8c51

Please sign in to comment.