[turba] Re: Further to; Firstname / LastName in addressbook - splitting them up

Johny horde at agotnes.com
Fri Jun 20 19:52:16 PDT 2003


Eric,

Quick answer to your Q - I'll do my best to accommodate your comments, 
at present only surname is mandatory (I use LDAP to test), and the other 
comments are linked to adding from the message.php code, and the code I 
put in for that was a shortcut for the user, they can still go in and 
edit the fields on the form before they submit in case the default 
behaviour is wrong.

Question; I get the following error;

Warning: Wrong datatype for first argument in call to array_key_exists 
in /var/www/html/hordeDev/lib/Notification/Listener.php on line 47

when I hit the 'Add Contact' icon from message.php. Fundamentally, it 
seems this breaks because in 'horde/lib/registry.php' the following 
section is removed;

registry.php:211
$this->services['turba']['contacts']['add'] = array(
...

and this is still called from

imp/message.php:180
  $res = $registry->call('contacts/add', ...

What would a fix for this be? Not sure whether to re-add the registry 
entry or if not, what to call from message.php?

All the code was fetched from CVS a few hours ago, so line numbers ought 
to be correct against HEAD :)

:)J

Eric Rostetter wrote:
> Quoting Johny <horde at agotnes.com>:
> 
> 
>>Add Contact -
>>   You cannot edit the 'Name' field anymore, instead;
>>   Add First Name / Last Name, it makes a composite Name out of these
>>and submits to driver.
> 
> 
> My worry here is people with a non-western style name.  Some people only
> have one name...  Some others might have five or more names.  Anything we
> do needs to be flexible enough to handle these cases.
> 
> 
>>   In LDAP this sets cn to composite name, sn to last name and givenName
>>to first name, basically from the sources.php mapping.
> 
> 
> Just make sure it acts right if only one field is set, and that you can
> somehow put in multiple names for those with lots of names and get a 
> reasonable response out of it.
> 
> 
>>   John Smith (FirstName LastName)
>>   Smith, John (LastName, FirstName)
>>   Smith John (would fail, however, cut&paste would allow for easy fix)
> 
> 
> And how about others like:
> 
> Eric (just first name)
> Rostetter (just last name)
> Eric Jon Rostetter (three names)
> Mr. Eric Jon Rostetter (how to we parse out titles et al?)
> The Honorable Eric Jon Rostetter (just another example).
> 
> 
>>Question is, is this of interest to others? 
> 
> 
> Yes, very much so.  I'd love to see this done.  But I think we need to
> be very careful to handle as many cases as possible.
> 
> At The University of Toledo (my previous job, before The University of
> Texas) we had a lame admissions program (turn-key commercial thingy) that
> insisted on western style names (first+last).  But we would get one or two
> students a year who had only one name.  The software wouldn't allow this.
> So eventually we ended up using their name as the last name, and putting
> "Ms." or "Mr." in the first name field, just so it would accept the name,
> and still print out fairly reasonable on the reports et al.
> 
> The point is, different cultures do different things, and we need to
> make sure we can accomodate them if at all possible.
> 
> 
>>Do any of the Horde blokes
>>see it as useful enough to warrant inclusion in the standard distro? 
> 
> 
> I would think so.  But I still have the above mentioned concerns.
> 
> 
>>If
>>so I can re-jig my changes to work with the HEAD and submit proper patches.
> 
> 
> That is critical to getting changes into CVS in a timely manor.
> 




More information about the turba mailing list