[turba] Contact list display error when no first or last name

Nathan Mills nathan at nwacg.net
Wed Feb 6 06:52:39 UTC 2008


   Hello all,

After 9 months of not messing with it, I decided to start messing  
around with SyncML again and ran into an interesting problem.

On my S60 phone, I have several contacts that are businesses, rather  
than individuals. The S60 address book allows the user to leave the  
first and last name blank and uses the company name instead if it  
exists. When I synced my phone to a new Turba install, the listing  
code was unhappy and threw several errors related to an invalid string  
index or some such. Additionally, with the default listing options,  
the contacts showed up with a completely blank name, which makes  
sense, since they had no name. ;)

I wrote a little patch to substitute the company field in formatName  
for the name or firstname/lastname fields when the name is otherwise  
completely blank. In addition to providing some indication of what the  
contact is with Turba's default settings it eliminates the error  
messages caused the alpha filtering in ListView.php when the name is  
blank.

There is some more work required to make it work completely, though,  
as the sorting code obviously doesn't operate on it, thus leaving the  
no-name entries at the top of whatever list they appear in. I'm not  
sure what the best way of handling that would be. I think perhaps the  
sort function itself should be patched to do with the company field  
what it does when there's a unified name field and the sort is on  
lastname.

-Nathan

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: turba.patch
Type: text/x-diff
Size: 735 bytes
Desc: not available
Url : http://lists.horde.org/archives/turba/attachments/20080206/f4949f93/attachment.bin 


More information about the turba mailing list