cvs: pear(NET_LDAP_0_6) /Net_LDAP LDAP.php

From: Date: Thu, 08 Apr 2004 14:50:01 +0000
Subject: cvs: pear(NET_LDAP_0_6) /Net_LDAP LDAP.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-18016@lists.php.net to get a copy of this message
jw Thu Apr 8 10:50:01 2004 EDT Modified files: (Branch: NET_LDAP_0_6) /pear/Net_LDAP LDAP.php Log: fix recursive delete http://cvs.php.net/diff.php/pear/Net_LDAP/LDAP.php?r1=1.19.2.1&r2=1.19.2.2&ty=u Index: pear/Net_LDAP/LDAP.php diff -u pear/Net_LDAP/LDAP.php:1.19.2.1 pear/Net_LDAP/LDAP.php:1.19.2.2 --- pear/Net_LDAP/LDAP.php:1.19.2.1 Mon Mar 8 06:42:44 2004 +++ pear/Net_LDAP/LDAP.php Thu Apr 8 10:50:00 2004 @@ -23,7 +23,7 @@ // | Jan Wagner | // +--------------------------------------------------------------------------+ // -// $Id: LDAP.php,v 1.19.2.1 2004/03/08 11:42:44 jw Exp $ +// $Id: LDAP.php,v 1.19.2.2 2004/04/08 14:50:00 jw Exp $ require_once('PEAR.php'); require_once('LDAP/Entry.php'); @@ -34,7 +34,7 @@ * * @author Tarjei Huse * @author Jan Wagner - * @version $Revision: 1.19.2.1 $ + * @version $Revision: 1.19.2.2 $ * @package Net_LDAP */ class Net_LDAP extends PEAR @@ -310,17 +310,16 @@ } } } - } 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;

« previous php.pear.cvs (#18016) next »