Z-push: Entries on phone with just a comma; unusable multiple emails (patch)

Chris Hastie lists at oak-wood.co.uk
Mon Oct 31 16:27:36 CET 2011


Since I finally got around to upgrading Kolab at the weekend I've been
playing around with Z-push and an HTC Wildfire Android phone. First
thing I noticed was that after syncing the first couple of dozen entries
in the phone phonebook displayed only commas. I'm also not fond of the
"lastname, firstname" format, so had a little look in the backend to see
if I could do anything about it.

The commas are a bug I think. The backend has a series of tests for
$contact->fileas being empty, attempting to find something sensible to
fill it with if it is. The problem is that the crude way in which
$contact->fileas is constructed in the first place means it always
contains at least the string ", ". The attached patch addresses this. It
also makes the format of $contact->fileas configurable on a global
basis. Ultimately this would probably be better as a user configurable
option, but there are only a few of us using this installation and we
all agree on our preferred format, and I suspect a user configurable
option would be a much bigger job :)

Many of the contacts that I have that miss a firstname and lastname
contain only email addresses. So I've added using email addresses as a
'fileas' if it is otherwise empty. My experience is that I can usually
get more idea of who / what an email address relates to than I can a
phone number, so I've put this above the fallback to using phone numbers
as a 'fileas'.

The other issue I had was the way contacts with multiple email addresses
were transferred. It seems Kolab stores such things as a comma separated
list in a single field. Transferring them to the device like this
rendered them useless, as it just didn't know what to do with them.
Since z-push allows for three email address fields, I've split such
strings up and placed them in the three fields. This seems to work fine
on the one device I've tested with.

Chris


-------------- next part --------------
A non-text attachment was scrubbed...
Name: kolab-zpush-backend.patch
Type: text/x-patch
Size: 3440 bytes
Desc: not available
URL: <http://lists.kolab.org/pipermail/users/attachments/20111031/f6d07ce1/attachment.bin>


More information about the users mailing list