[Tickets #7122] Horde imports least-important number from Synthesis
bugs at horde.org
bugs at horde.org
Mon Jul 28 20:07:56 UTC 2008
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/7122
------------------------------------------------------------------------------
Ticket | 7122
Created By | deryk-lists at mod-soft.com
Summary | Horde imports least-important number from Synthesis
Queue | SyncML
Type | Enhancement
State | New
Priority | 1. Low
Milestone |
Patch |
Owners |
------------------------------------------------------------------------------
deryk-lists at mod-soft.com (2008-07-28 16:07) wrote:
Consider the following vcard snippet:
TEL;HOME;VOICE;X-Synthesis-Ref1:(123) 456-7890
TEL;WORK;VOICE;X-Synthesis-Ref1:(234) 567-8901
TEL;WORK;VOICE;X-Synthesis-Ref2:(345) 678-9012
TEL;CELL;VOICE;X-Synthesis-Ref1:(456) 789-0123
Synthesis has listed the primary work number first. However, Horde
will insert the secondary work number since it's parsed after the
primary number.
This behaviour is likely not specific to Synthesis.
The following (rough) code can be used in
lib/syncml/device/synthesis.php to drop secondary values:
// ... delete X-Synthesis-Ref1 tag
$content = preg_replace('/;X-Synthesis-Ref1(:|;)/', '\1', $content);
// ... and remove any other *values* containing X-Synthesis-Ref*
$content =
preg_replace('/(\r\n|\r|\n).*;X-Synthesis-Ref\d+(:|;).*(\r\n|\r|\n)/',
'\1', $content);
// ... and finally delete all X-Synthesis-* tags
$content = preg_replace('/;X-Synthesis-.*(:|;)(.*)/', '\1', $content);
This works for Synthesis (tested with version v3.0.2.22 for Windows
Mobile) but it isn't a comprehensive fix.
More information about the bugs
mailing list