First off, thanks to everyone who works on FO. The new 'getting started' screen looks particularly great, among other things.
Some time back I made some improvements to the vcard import/export that were merged into the FO code. They helped but unfortunately, even today (even on the Sky demo) you cannot export, delete, and then re-import a contact without losing data!
If you try this procedure:
-Create new contact
-Fill in most of the addresses and phone numbers and other fields
-Save
-Export vcard
-Trash and delete the contact
-Import the vcard you just exported
...that will result in over half of the contact's phone numbers disappearing (and those that survive are in the wrong order). Also, the Middlename and Department fields disappear as well.
This is just what the software does to natively exported vcards; you don't even want to know what happens when the vcard is 3rd party, and includes newline-folded address lines or QP encoded strings. (Outlook vcards have both)
The attached patch fixes all but one of these problems (the folded lines in 3rd party vcards remain an issue). However, it enables you to export a vcard and re-import it without losing data, including many of the fields that are not in the vcard spec like 'Department'. Even that part is done according to spec though, because it is exported with an 'X-' to signify a custom field. It also does a much better job with importing 3rd party vcards and it can now handle QP encoded strings.
This is NOT the version of the patch that adds fields to Contact objects, which I had posted before. That one modified a lot of code and other stuff including the MySQL schema and lang strings.
This version only modifies 2 functions in ./application/controllers/ContactController.class.php so it should be infinitely easier to evaluate. It doesn't touch the schema or lang stuff or any other code. This one I'm attaching is updated for v1.7.5 (but read the install note below!).
If you find any bugs or have any questions please let me know.
Thank you,
Mark
IMPORTANT INSTALL NOTE!!!:
Somewhere around v1.7.3 the file ContactController.class.php (along with most of the rest of the php code files) changed from using unix line endings to using dos line endings. The attached patch file uses unix line endings and the 'patch' binary (at least the one I have) will not apply it successfully unless you change the line endings in the target file. (I do ':set ff=unix' in vim or 'flip -u')
Once that is done I'm using something along the lines of:
# cd /example/path/to/fengoffice
# sudo patch -p1 --dry-run < /example/path/to/vcard_ups_for_v175.patch