After having a look at the code of the thunderbird extension, i commented out some code in components\mpe.js (around line 293) to make it look like:
Code: Alles auswählen
out += 'CARID:' + EncodeQP(Card.phoneticLastName) + ';LEDIT:' + Card.lastModifiedDate + /*AddV('FNAME', Card.firstName)*/
/*AddV('FNAME', Card.displayName)*/
/*+ AddV('LNAME', Card.lastName)*/ /*+*/ AddV('DNAME', Card.displayName) + AddV('DMAIL', Card.defaultEmail)
+ AddV('PMAIL', Card.primaryEmail) + AddV('SMAIL', Card.secondEmail) + AddV('TWORK', Card.workPhone)
+ AddV('TCELL', Card.cellularNumber) + AddV('THOME', Card.homePhone) + AddV('TEFAX', Card.faxNumber)
+ AddV('TPAGE', Card.pagerNumber) + AddV('HSTR1', Card.homeAddress) + AddV('HSTR2', Card.homeAddress2)
+ AddV('HCITY', Card.homeCity) + AddV('HSTAT', Card.homeState) + AddV('HZIPC', Card.homeZipCode)
+ AddV('HCOUN', Card.homeCountry) + AddV('WSTR1', Card.workAddress) + AddV('WSTR2', Card.workAddress2)
+ AddV('WCITY', Card.workCity) + AddV('WSTAT', Card.workState) + AddV('WZIPC', Card.workZipCode)
+ AddV('WCOUN', Card.workCountry) + AddV('DADDR', Card.defaultAddress) + AddV('WURL1', Card.webPage1)
+ AddV('WURL2', Card.webPage2) + AddV('TITLE', Card.jobTitle) + AddV('COMPA', Card.company)
+ AddV('BYEAR', Card.birthYear) + AddV('BMONT', Card.birthMonth) + AddV('BIDAY', Card.birthDay)
+ AddV('NOTES', Card.notes);
return out;
}
function LineToCard(Card, Line)
{
var vs = SplitV(Line);
Card = Card.QueryInterface(Components.interfaces.nsIAbCard);
Card.phoneticLastName = ValueNN("CARID",vs);
//Card.firstName = ValueNN("FNAME",vs);
//Card.lastName = ValueNN("LNAME",vs);
Card.displayName = ValueNN("DNAME",vs);
try { Card.defaultEmail = ValueNN("DMAIL",vs); } catch (ex) {}
Card.primaryEmail = ValueNN("PMAIL",vs);
Card.secondEmail = ValueNN("SMAIL",vs);
Card.workPhone = ValueNN("TWORK",vs);
Card.homePhone = ValueNN("THOME",vs);
When I sync now it seems to work to use the DisplayName as the contacts name in the phone. When i sync from thunderbird to the phone, the display name is used as the contacts name, and when i sync from the phone to thunderbird, the display name is filled in and the first- and lastname are untouched, which is what i wanted.
However since i don't know the exact details about the synching, i'm wondering if this could cause any negative side effects, possible datacorruptions, or other errors?
If there is no problem with this change, why not make it an option in the thunderbird extension?