[Tickets #3966] NEW: Move duplicate code to build RDN into new method to simplify subclassing of LDAP driver

bugs@bugs.horde.org bugs at bugs.horde.org
Mon May 22 07:12:29 PDT 2006


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=3966
-----------------------------------------------------------------------
 Ticket             | 3966
 Created By         | avo at trustsec.de
 Summary            | Move duplicate code to build RDN into new method to simplify subclassing of LDAP driver
 Queue              | Turba
 Version            | 2.1.1
 State              | New
 Priority           | 1. Low
 Type               | Enhancement
 Owners             | 
+New Attachment     | patch-turba_lib_Driver_ldap_php.diff
-----------------------------------------------------------------------


avo at trustsec.de (2006-05-22 07:12) wrote:

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.




More information about the bugs mailing list