cvs: pear /Net_LDAP/LDAP Util.php

From: Date: Tue, 18 Sep 2007 09:14:12 +0000
Subject: cvs: pear /Net_LDAP/LDAP Util.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-48628@lists.php.net to get a copy of this message
beni Tue Sep 18 09:14:12 2007 UTC Modified files: /pear/Net_LDAP/LDAP Util.php Log: * Little doc enhancement * Fixed Bug #12060 incorrect handling of reverse option in Net_LDAP_Util::ldap_explode_dn * Fixed unreported bug: Applying casefolding "none" to Net_LDAP_Util::ldap_explode_dn remained upper-casefold http://cvs.php.net/viewvc.cgi/pear/Net_LDAP/LDAP/Util.php?r1=1.19&r2=1.20&diff_format=u Index: pear/Net_LDAP/LDAP/Util.php diff -u pear/Net_LDAP/LDAP/Util.php:1.19 pear/Net_LDAP/LDAP/Util.php:1.20 --- pear/Net_LDAP/LDAP/Util.php:1.19 Mon Jul 16 07:33:36 2007 +++ pear/Net_LDAP/LDAP/Util.php Tue Sep 18 09:14:12 2007 @@ -22,7 +22,7 @@ // | Authors: Benedikt Hallinger | // +--------------------------------------------------------------------------+ // -// $Id: Util.php,v 1.19 2007/07/16 07:33:36 beni Exp $ +// $Id: Util.php,v 1.20 2007/09/18 09:14:12 beni Exp $ require_once "PEAR.php"; @@ -34,7 +34,7 @@ * * @package Net_LDAP * @author Benedikt Hallinger <beni@php.net> - * @version $Revision: 1.19 $ + * @version $Revision: 1.20 $ */ class Net_LDAP_Util extends PEAR { @@ -48,7 +48,8 @@ // We do nothing here, since all methods can be called statically. // In Net_LDAP <= 0.7, we needed a instance of Util, because // it was possible to do utf8 encoding and decoding, but this - // has been moved to the LDAP class. + // has been moved to the LDAP class. The constructor remains only + // here to document the downward compatibility of creating a instance. } /** @@ -92,12 +93,12 @@ */ function ldap_explode_dn($dn, $options = array('casefold' => 'upper')) { - $options['onlyvalues'] == true ? $options['onlyvalues'] = 1 : $options['onlyvalues'] = 0; - $options['reverse'] == true ? $options['reverse'] = false : $options['reverse'] = true; + $options['onlyvalues'] = ($options['onlyvalues']) ? true : false; + $options['reverse'] = ($options['reverse']) ? true : false; if (!isset($options['casefold'])) $options['casefold'] = 'upper'; // Escaping of DN and stripping of "OID." - $dn = Net_LDAP_Util::canonical_dn($dn); + $dn = Net_LDAP_Util::canonical_dn($dn, array('casefold' => $options['casefold'])); // splitting the DN $dn_array = preg_split('/(?<=[^\\\\]),/', $dn);

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