Permalink
Browse files

fix recursive delete

  • Loading branch information...
1 parent 89b6d69 commit 572b8269ed5b1c0b6e2e39e492ab77869da11833 Jan Wagner committed Apr 8, 2004
Showing with 10 additions and 11 deletions.
  1. +10 −11 LDAP.php
View
@@ -310,17 +310,16 @@ function delete($dn, $param = array())
}
}
}
- } else {
- if (!@ldap_delete($this->_link, $dn)) {
- $error = ldap_errno($this->_link );
- if ($error == 66) {
- /* entry has subentries */
- return $this->raiseError('Net_LDAP::delete: Cound not delete entry ' . $dn .
- ' because of subentries. Use the recursive param to delete them.');
- } else {
- return $this->raiseError("Net_LDAP::delete: Could not delete entry " . $dn ." because: ".
- $this->errorMessage($error), $error);
- }
+ }
+ if (!@ldap_delete($this->_link, $dn)) {
+ $error = ldap_errno($this->_link );
+ if ($error == 66) {
+ /* entry has subentries */
+ return $this->raiseError('Net_LDAP::delete: Cound not delete entry ' . $dn .
+ ' because of subentries. Use the recursive param to delete them.');
+ } else {
+ return $this->raiseError("Net_LDAP::delete: Could not delete entry " . $dn ." because: ".
+ $this->errorMessage($error), $error);
}
}
return true;

0 comments on commit 572b826

Please sign in to comment.