Code

Improved setup performance from 380 seconds to 6secs.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 9 May 2008 08:13:42 +0000 (08:13 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 9 May 2008 08:13:42 +0000 (08:13 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@10853 594d385d-05f5-0310-b6e9-bd551577e9d8

setup/class_setupStep_Migrate.inc

index 310d79100afd969be291d1f75c4da23b3c88dcd3..af29328f5e058e8e43b4f05194c089adba74e45f 100644 (file)
@@ -184,7 +184,7 @@ class Step_Migrate extends setup_step
         $cv['tls']);
 
     $ldap->cd($cv['base']);
-    $res = $ldap->search("uidNumber=*",array("dn","uidNumber"));
+    $res = $ldap->search("(&(objectClass=posixAccount)(uidNumber=*))",array("dn","uidNumber"));
     if(!$res){
       $this->checks['uidNumber_usage']['STATUS']    = FALSE;
       $this->checks['uidNumber_usage']['STATUS_MSG']= _("LDAP query failed");
@@ -1586,7 +1586,9 @@ class Step_Migrate extends setup_step
 
     /* Check if root object exists */
     $ldap->cd($cv['base']);
+       $ldap->set_size_limit(1);
     $res = $ldap->search("(objectClass=*)");
+       $ldap->set_size_limit(0);
     $err = ldap_errno($ldap->cid); 
 
     if( !$res ||