Do not apply server side sorting for paged search requests

Revert this prior start working on #10147

refs #10147
This commit is contained in:
Johannes Meyer 2015-10-01 15:47:11 +02:00
parent 50e66810bf
commit 57f30b1f92
3 changed files with 16 additions and 8 deletions

View File

@ -808,7 +808,7 @@ class LdapConnection implements Selectable, Inspectable
$ds = $this->getConnection();
$serverSorting = $this->getCapabilities()->hasOid(LdapCapabilities::LDAP_SERVER_SORT_OID);
$serverSorting = false;//$this->getCapabilities()->hasOid(LdapCapabilities::LDAP_SERVER_SORT_OID);
if (! $serverSorting && $query->hasOrder()) {
foreach ($query->getOrder() as $rule) {
if (! in_array($rule[0], $fields)) {

View File

@ -48,7 +48,7 @@ class LdapQuery extends SimpleQuery
protected function init()
{
$this->filters = array();
$this->usePagedResults = true;
$this->usePagedResults = false;
}
/**

View File

@ -291,11 +291,15 @@ class AdminAccountPage extends Form
protected function fetchUsers()
{
try {
return $this
$query = $this
->createUserBackend()
->select(array('user_name'))
->order('user_name', 'asc', true)
->fetchColumn();
->order('user_name', 'asc', true);
if (in_array($this->backendConfig['backend'], array('ldap', 'msldap'))) {
$query->getQuery()->setUsePagedResults();
}
return $query->fetchColumn();
} catch (Exception $_) {
// No need to handle anything special here. Error means no users found.
return array();
@ -346,10 +350,14 @@ class AdminAccountPage extends Form
protected function fetchGroups()
{
try {
return $this
$query = $this
->createUserGroupBackend()
->select(array('group_name'))
->fetchColumn();
->select(array('group_name'));
if (in_array($this->backendConfig['backend'], array('ldap', 'msldap'))) {
$query->getQuery()->setUsePagedResults();
}
return $query->fetchColumn();
} catch (Exception $_) {
// No need to handle anything special here. Error means no groups found.
return array();