foreach ($this->supportedFields as $vcardField => $databaseFields)
@@ -1094,12 +1093,29 @@
// 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?
+
$finalRowNames = array();
foreach ($rowNames as $rowName => $vcardKey)
{
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