[turba] Re:Distribution lists - trouble adding LDAP entry to local SQLaddressbook

Kevin M. Myer kevin_myer at iu13.org
Mon Aug 4 06:10:22 PDT 2003


I'm glad someone else sees this as a problem too.  When I was debugging this
awhile back, in looking through the way the information is stored in the SQL
database, it appears that one more level of information needs to be stored with
each entry, i.e. which database or directory is the source of the entry.  It
appears that the assumption that is made is that all entries are stored in a
SQL database and thus, everything is based on a unique id that is generated for
each entry.  For LDAP, this should really be the DN for that entry.  Maybe
everything is already setup this way and I'm just missing something but it
seems that the way to do this for a Group is (based on the turba_objects SQL
table):

(key,owner,type,group_entries(serialized),name,etc.)

The serialized group_entries would be expanded like so:

Data source:group member key (either unique ID for SQL or DN for LDAP)

I found it helpful to define a List/Groups addressbook preference item,  because
at the time, I believe that it was hardcoded for the "Add to List" menu to only
show up if you were on your Personal Addressbook - this allowed for the menu to
show up anywhere after I made some modifications to browse.php and I believe
templates/browse/actions.inc.  But where I ran into problems was when I
actually tried to add an entry from LDAP to my Personal Addressbook List and
thats where I think something wasn't quite sorted out right with the
serialization.

I haven't looked at it in any great detail since then, although I think a
mixed-source List is a desireable thing.

I'm not a PHP programmer (more of a PHP scratcher) so if somehow could help me
decipher what a turba_objects Group entry really is composed of, I'd appreciate
it.  Specifically, from the entry below:

a:3:{i:3;s:32:\<SQL uid>;i:4;s:32:\<SQL uid>;i:5;s:32:\<SQL uid>

a=?
i=index or element number?
s=source?

based on the below entry:

INSERT INTO turba_objects VALUES
('0c29ccb45315ec80b8003e559d398e73','kevin_myer at iu13.org','Group','a:3:{i:3;s:32:\"13cbb33750f33b7d32da7871ca0aaf0c\";i:4;s:32:\"8a766694563d036c1ed96c05ee3e91ba\";i:5;s:32:\"f8888f8bad642a1f33933bf3b6fd0070\";}','test','','','','','','','','','','','','','','');

It may be that all the pieces to used mixed-sources Lists are already there and
it just needs some tweaking...

Kevin

--
Kevin M. Myer
Systems Administrator
Lancaster-Lebanon Intermediate Unit 13
(717) 560-6140



More information about the turba mailing list