| Summary | (whitespace-)trimming of mapped attributes |
| Queue | Turba |
| Queue Version | 2.2-RC1 |
| Type | Enhancement |
| State | Resolved |
| Priority | 1. Low |
| Owners | Jan Schneider <jan (at) horde (dot) org> |
| Requester | xk3 (at) mompl (dot) org |
| Created | 12/09/2007 (154 days ago) |
| Due | |
| Updated | 12/14/2007 (149 days ago) |
| Assigned | |
| Resolved | 12/14/2007 (149 days ago) |
| Attachments | |
| Milestone | |
| Patch |
Assigned to Jan Schneider
yes, worksThanks!
Can you try if the following commit fixed it:http://cvs.horde.org/diff.php/turba/lib/Driver.php?r1=1.175&r2=1.176&ty=u
horde-FRAMEWORK_3-2007-12-11
horde-HEAD-2007-12-11
turba-HEAD-2007-12-11
$attributes just before adding to LDAP at horde/turba/lib/Driver/ldap.php:266 error_log and print_r for new contact with only lastname (and email)
Array
(
[DUFFtype] => Object
[cn] => Lastname <-- " Lastname" with leading space
[sn] => Lastname
[mail] => xxx@a.com
[SNIP]
ldapsearch results in:
cn:: IExhc3RuYW1l <-- " Lastname" with leading space (base64)
sn: Lastname
State ⇒ Feedback
This happens already. Where exactly do you see this *not* happening? And in case this has been implemented after RC1, did you try a recent snaphot?State ⇒ New
Queue ⇒ Turba
Summary ⇒ (whitespace-)trimming of mapped attributes
Priority ⇒ 1. Low
Type ⇒ Enhancement
Mapping attributes from multiple hash values can generate hideous results if some of the attributes are not set. Example:
'name' => array('fields' => array('firstname', 'lastname'),
'format' => '%s %s',
'attribute' => 'cn'),
If firstname is not set, cn becomes " Lastname" with a leading space.
Would be nice if mapped attributes get trimmed afterwards, maybe even on multiple whitespaces within the string. Yes, there cannot be a general trim rule, but maybe another map parameter just for the (common?) whitespace separation?