Commit be38f66b authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Fixes #4519 Attempt at a few optimisations

parent 50caf2f4
......@@ -703,7 +703,8 @@ class LDAP
$delarray = array();
/* Get sorted list of dn's to delete */
$this->ls($srp, "(objectClass=*)", $deletedn);
$this->cd($deletedn);
$this->search($srp, "(objectClass=*)");
while ($this->fetch($srp)) {
$deldn = $this->getDN($srp);
$delarray[$deldn] = strlen($deldn);
......@@ -713,11 +714,8 @@ class LDAP
/* Really Delete ALL dn's in subtree */
foreach (array_keys($delarray) as $key) {
$this->rmdir_recursive($srp, $key);
$r = @ldap_delete($this->cid, LDAP::fix($key));
}
/* Finally Delete own Node */
$r = @ldap_delete($this->cid, LDAP::fix($deletedn));
$this->error = @ldap_error($this->cid);
return ($r ? $r : 0);
} else {
......
......@@ -64,10 +64,7 @@ class ldapMultiplexer {
array_unshift($parameters, $this->sr);
}
$class = new ReflectionClass($this->object);
$method = $class->getMethod($methodName);
return $method->invokeArgs($this->object, $parameters);
return call_user_func_array(array($this->object, $methodName), $parameters);
}
/*
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment