6.0.0-beta1
7/12/25

[#3966] Move duplicate code to build RDN into new method to simplify subclassing of LDAP driver
Summary Move duplicate code to build RDN into new method to simplify subclassing of LDAP driver
Queue Turba
Queue Version 2.1.1
Type Enhancement
State Resolved
Priority 1. Low
Owners
Requester avo (at) trustsec (dot) de
Created 05/22/2006 (6991 days ago)
Due
Updated 05/23/2006 (6990 days ago)
Assigned
Resolved 05/23/2006 (6990 days ago)
Milestone
Patch No

History
05/23/2006 05:40:26 PM Chuck Hagenbuch Comment #2
State ⇒ Resolved
Reply to this comment
Makes sense. Committed to HEAD and FW_3. Thanks!
05/22/2006 02:12:29 PM avo (at) trustsec (dot) de Comment #1
State ⇒ New
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Move duplicate code to build RDN into new method to simplify subclassing of LDAP driver
Queue ⇒ Turba
New Attachment: patch-turba_lib_Driver_ldap_php.diff Download
Reply to this comment
In turba/lib/Driver/ldap.php the RDN of objects is currently assembled 
in two functions: _makeKey and _save (if an object is renamed). I 
suggest to move the code that builds the RDN from the attributes into 
a new method. With this change it becomes much easier to subclass the 
LDAP driver and to build your own custom DNs. Maintainance also 
becomes somewhat easier if no code is duplicated.



I've attached a patch that introduces a new method called _makeRDN.   
The patch was created using the files from Turba 2.1.1 but should 
should apply against HEAD without problems.

Saved Queries