[#8654] trimming composite fields
Summary trimming composite fields
Queue Turba
Queue Version 2.3.2
Type Enhancement
State Resolved
Priority 1. Low
Owners Jan Schneider <jan (at) horde (dot) org>
Requester xk3 (at) mompl (dot) org
Created 10/20/09 (149 days ago)
Due
Updated 01/12/10 (65 days ago)
Assigned
Resolved 10/20/09 (149 days ago)
Attachments
Milestone 2.3.3
Patch No

History
01/12/10 CVS Commit Comment #4 Reply to this comment
10/20/09 Jan Schneider Milestone ⇒ 2.3.3
State ⇒ Resolved
Summary ⇒ trimming composite fields
Assigned to Jan Schneider
 
10/20/09 CVS Commit Comment #3 Reply to this comment
10/20/09 CVS Commit Comment #2 Reply to this comment
10/20/09 xk3 (at) mompl (dot) org Comment #1
State ⇒ New
Patch ⇒
Milestone ⇒
Queue ⇒ Turba
Summary ⇒ trimming comopsite fields
Type ⇒ Enhancement
Priority ⇒ 1. Low
Reply to this comment
a trim() is often not enough for a composite field, if some of the 
fields it is composed from are empty.



I always patch in toDriverKeys() the trim() with a 
preg_replace('/\s\s+/', ' ', ...). This avoids names such as 
"Firstname__Lastname", if the middle name is empty.