foreach ($this->supportedFields as $vcardField => $databaseFields)
@@ -1088,14 +1089,10 @@
#error_log(print_r($rowNames, true));
- // now we have all rowNames the vcard provides
- // we just need to map to the right addressbook fieldnames
- // we need also to take care about ADR for example. we do not
- // support this. We support only ADR;WORK or ADR;HOME
-
- // njv: As the order of tag occurence is undefined and tags 1... to n are mapped to one addressbook
- // fieldname and tags 1... to n may have conflicting content eg EMAIL is set but EMAIL;INTERNET is empty
- // and both are mapped to "email" who wins?
+ // All rowNames of the vCard are now concatenated with their qualifiers.
+ // If qualifiers are missing we apply a default strategy.
+ // E.g. ADR will be either ADR;WORK, if no ADR;WORK is given,
+ // or else ADR;HOME, if not available elsewhere.
$finalRowNames = array();
@@ -1103,19 +1100,6 @@
{
switch($rowName)
{
- case 'TEL;VOICE;HOME':
- case 'TEL;VOICE;WORK': // check if we have a mapping without VOICE
- $replace = str_replace('VOICE;','',$rowName);
- if (!isset($rowNames[$replace]) && array_key_exists($replace, $this->supportedFields))
- {
- $finalRowNames[$replace] = $vcardKey; // if yes use that
- }
- else
- {
- $finalRowNames[$rowName] = $vcardKey; // else use existing mapping
- }
- break;
-
case 'ADR':
if (!isset($rowNames[$rowName . ';WORK']))
{
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge _______________________________________________
eGroupWare-cvs mailing list
eGroupWare-cvs@... https://lists.sourceforge.net/lists/listinfo/egroupware-cvs