mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bug #299699 --> don't check for "Internet" property in "Email" line of vCard
Patch by mozilla.org@pidgin.org r=mscott sr=bienvenu a=asa
This commit is contained in:
parent
98a69e69e3
commit
5443f9c6e1
@ -1120,14 +1120,7 @@ static void convertNameValue(VObject *vObj, nsIAbCard *aCard)
|
||||
return;
|
||||
}
|
||||
else if (PL_strcasecmp(VCEmailAddressProp, vObjectName(vObj)) == 0)
|
||||
{
|
||||
// only treat it as a match if it is an internet property
|
||||
VObject* iprop = isAPropertyOf(vObj, VCInternetProp);
|
||||
if (iprop)
|
||||
cardColName = kPriEmailColumn;
|
||||
else
|
||||
return;
|
||||
}
|
||||
cardColName = kPriEmailColumn;
|
||||
else if (PL_strcasecmp(VCFamilyNameProp, vObjectName(vObj)) == 0)
|
||||
cardColName = kLastNameColumn;
|
||||
else if (PL_strcasecmp(VCFullNameProp, vObjectName(vObj)) == 0)
|
||||
|
@ -583,7 +583,6 @@ static int OutputBasicVcard(MimeObject *obj, VObject *v)
|
||||
char * htmlLine2 = NULL;
|
||||
char * htmlLine = NULL;
|
||||
VObject *prop = NULL;
|
||||
VObject* prop2 = NULL;
|
||||
char * urlstring = NULL;
|
||||
char * namestring = NULL;
|
||||
char * emailstring = NULL;
|
||||
@ -629,12 +628,7 @@ static int OutputBasicVcard(MimeObject *obj, VObject *v)
|
||||
emailstring = vCardService->FakeCString(prop);
|
||||
if (emailstring)
|
||||
{
|
||||
/* if its an internet address prepend the mailto url */
|
||||
prop2 = vCardService->IsAPropertyOf(prop, VCInternetProp);
|
||||
if (prop2)
|
||||
htmlLine2 = PR_smprintf ("<<A HREF=""mailto:%s"" PRIVATE>%s</A>>", emailstring, emailstring);
|
||||
else
|
||||
htmlLine2 = PR_smprintf ("%s", emailstring);
|
||||
htmlLine2 = PR_smprintf ("<<A HREF=""mailto:%s"" PRIVATE>%s</A>>", emailstring, emailstring);
|
||||
PR_FREEIF (emailstring);
|
||||
}
|
||||
}
|
||||
@ -2009,7 +2003,6 @@ static int OutputBasicVcard(MimeObject *aMimeObj, VObject *aVcard, nsACString& v
|
||||
int status = 0;
|
||||
|
||||
VObject *prop = NULL;
|
||||
VObject *prop2 = NULL;
|
||||
nsCAutoString urlstring;
|
||||
nsCAutoString namestring;
|
||||
nsCAutoString emailstring;
|
||||
@ -2052,12 +2045,7 @@ static int OutputBasicVcard(MimeObject *aMimeObj, VObject *aVcard, nsACString& v
|
||||
emailstring.Adopt(vCardService->FakeCString(prop));
|
||||
if (!emailstring.IsEmpty())
|
||||
{
|
||||
/* if its an internet address prepend the mailto url */
|
||||
prop2 = vCardService->IsAPropertyOf(prop, VCInternetProp);
|
||||
if (prop2)
|
||||
vCardOutput += nsPrintfCString(512, " <<a href=""mailto:%s"" private>%s</a>>", emailstring.get(), emailstring.get());
|
||||
else
|
||||
vCardOutput += emailstring;
|
||||
vCardOutput += nsPrintfCString(512, " <<a href=""mailto:%s"" private>%s</a>>", emailstring.get(), emailstring.get());
|
||||
}
|
||||
} // if email address property
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user