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:
scott%scott-macgregor.org 2005-07-14 19:01:38 +00:00
parent 98a69e69e3
commit 5443f9c6e1
2 changed files with 3 additions and 22 deletions

View File

@ -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)

View File

@ -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 ("&lt;<A HREF=""mailto:%s"" PRIVATE>%s</A>&gt;", emailstring, emailstring);
else
htmlLine2 = PR_smprintf ("%s", emailstring);
htmlLine2 = PR_smprintf ("&lt;<A HREF=""mailto:%s"" PRIVATE>%s</A>&gt;", 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, "&nbsp;&lt;<a href=""mailto:%s"" private>%s</a>&gt;", emailstring.get(), emailstring.get());
else
vCardOutput += emailstring;
vCardOutput += nsPrintfCString(512, "&nbsp;&lt;<a href=""mailto:%s"" private>%s</a>&gt;", emailstring.get(), emailstring.get());
}
} // if email address property