cvs: pear(NET_LDAP_0_6) /Net_LDAP LDAP.php

From: Date: Wed, 07 Jul 2004 19:04:55 +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-21609@lists.php.net to get a copy of this message
tarjei Wed Jul 7 15:04:55 2004 EDT Modified files: (Branch: NET_LDAP_0_6) /pear/Net_LDAP LDAP.php Log: Fixed one documentationerror and added a check to see if php supports the ldapextension. http://cvs.php.net/diff.php/pear/Net_LDAP/LDAP.php?r1=1.19.2.2&r2=1.19.2.3&ty=u Index: pear/Net_LDAP/LDAP.php diff -u pear/Net_LDAP/LDAP.php:1.19.2.2 pear/Net_LDAP/LDAP.php:1.19.2.3 --- pear/Net_LDAP/LDAP.php:1.19.2.2 Thu Apr 8 10:50:00 2004 +++ pear/Net_LDAP/LDAP.php Wed Jul 7 15:04:55 2004 @@ -23,7 +23,7 @@ // | Jan Wagner | // +--------------------------------------------------------------------------+ // -// $Id: LDAP.php,v 1.19.2.2 2004/04/08 14:50:00 jw Exp $ +// $Id: LDAP.php,v 1.19.2.3 2004/07/07 19:04:55 tarjei 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.2 $ + * @version $Revision: 1.19.2.3 $ * @package Net_LDAP */ class Net_LDAP extends PEAR @@ -102,6 +102,9 @@ */ function Net_LDAP($_config = array()) { + if (!function_exists('ldap_connect')){ + return $this->raiseError("It seems that you do not have the ldap-extension installed. Please install it before using this package."); + } foreach ($_config as $k => $v) { $this->_config[$k] = $v; } @@ -622,7 +625,7 @@ * * @param string dn * @param array Array of Attributes to select - * @return mixed Net_LDAP_Entry or false + * @return object Net_LDAP_Entry or Net_LDAP_Error */ function &getEntry($dn, $attr = array('')) { @@ -630,7 +633,7 @@ if (Net_LDAP::isError($result)) { return $result; } - $entry = $result->shift_entry(); + $entry = $result->shiftEntry(); if (false == $entry) { return $this->raiseError('Could not fetch entry'); }

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