Only sort children after reading additional entries

This commit is contained in:
Deon George
2009-08-22 12:56:11 +10:00
parent 76ddeccf8c
commit 26fa2ba2c5
3 changed files with 39 additions and 3 deletions

View File

@@ -301,6 +301,8 @@ abstract class Tree {
if ($nolimit)
@set_time_limit($_SESSION[APPCONFIG]->getValue('search','time_limit'));
$this->entries[$dnlower]->readingChildren(true);
foreach ($ldap['children'] as $child) {
if (DEBUG_ENABLED)
debug_log('Adding (%s)',64,0,__FILE__,__LINE__,__METHOD__,$child);
@@ -309,6 +311,8 @@ abstract class Tree {
$this->entries[$dnlower]->addChild($child);
}
$this->entries[$dnlower]->readingChildren(false);
if (count($this->entries[$dnlower]->getChildren()) == $ldap['child_limit'])
$this->entries[$dnlower]->setSizeLimited();
else