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

Fixes #4519 Attempt at a few optimisations

Showing with 4 additions and 9 deletions
+4 -9
...@@ -703,7 +703,8 @@ class LDAP ...@@ -703,7 +703,8 @@ class LDAP
$delarray = array(); $delarray = array();
/* Get sorted list of dn's to delete */ /* Get sorted list of dn's to delete */
$this->ls($srp, "(objectClass=*)", $deletedn); $this->cd($deletedn);
$this->search($srp, "(objectClass=*)");
while ($this->fetch($srp)) { while ($this->fetch($srp)) {
$deldn = $this->getDN($srp); $deldn = $this->getDN($srp);
$delarray[$deldn] = strlen($deldn); $delarray[$deldn] = strlen($deldn);
...@@ -713,11 +714,8 @@ class LDAP ...@@ -713,11 +714,8 @@ class LDAP
/* Really Delete ALL dn's in subtree */ /* Really Delete ALL dn's in subtree */
foreach (array_keys($delarray) as $key) { 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); $this->error = @ldap_error($this->cid);
return ($r ? $r : 0); return ($r ? $r : 0);
} else { } else {
......
...@@ -64,10 +64,7 @@ class ldapMultiplexer { ...@@ -64,10 +64,7 @@ class ldapMultiplexer {
array_unshift($parameters, $this->sr); array_unshift($parameters, $this->sr);
} }
$class = new ReflectionClass($this->object); return call_user_func_array(array($this->object, $methodName), $parameters);
$method = $class->getMethod($methodName);
return $method->invokeArgs($this->object, $parameters);
} }
/* /*
......
  • bmortier @bmortier

    mentioned in issue #1441

    By Côme Chilliet on 2017-09-02T15:26:36 (imported from GitLab)

    ·

    mentioned in issue #1441

    By Côme Chilliet on 2017-09-02T15:26:36 (imported from GitLab)

    Toggle commit list
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