[Tickets #11888] Re: Add possibility for composite RDNs in LDAP
noreply at bugs.horde.org
noreply at bugs.horde.org
Fri Jun 13 11:59:48 UTC 2014
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/11888
------------------------------------------------------------------------------
Ticket | 11888
Updated By | horde at iotti.biz
Summary | Add possibility for composite RDNs in LDAP
Queue | Horde Framework Packages
Version | Git master
Type | Enhancement
State | Resolved
Priority | 2. Medium
Milestone |
Patch | 1
Owners | Jan Schneider
------------------------------------------------------------------------------
horde at iotti.biz (2014-06-13 11:59) wrote:
Just to point that I remove the calls to array_map with something
functionally equivalent. Magically all my problems are solved. In
particular I switchd from:
public static function quoteDN($parts)
{
return implode(
',',
array_map(
function($attribute)
{
if (is_array($attribute[0])) {
return implode(
'+',
array_map('self::_quoteRDN', $attribute)
);
} else {
return self::_quoteRDN($attribute);
}
},
$parts
)
);
}
to:
public static function quoteDN($parts)
{
$p1 = array();
foreach( $parts as $attribute ) {
if (is_array($attribute[0])) {
$p2 = array();
foreach( $attribute as $a ) {
$a2[] = self::_quoteRDN($a);
}
$p1[] = implode( '+', $a2 );
} else {
$p1[] = self::_quoteRDN($attribute);
}
}
return implode(
',',
$p1
);
}
More information about the bugs
mailing list