[Tickets #6849] E51 sends X-<category>
bugs at horde.org
bugs at horde.org
Thu Jun 5 20:04:28 UTC 2008
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/6849
-----------------------------------------------------------------------
Ticket | 6849
Created By | xk3 at mompl.org
Summary | E51 sends X-<category>
Queue | SyncML
Type | Bug
State | Unconfirmed
Priority | 1. Low
Milestone |
Patch |
Owners |
-----------------------------------------------------------------------
xk3 at mompl.org (2008-06-05 16:04) wrote:
using current horde 3.2 and modules
My Nokia E51 syncs categories back prepending "X-". Found some code in
P800.php for stripping and added it to Nokia.php: solved the problem. The
following function is based on the one from SyncML_Device extended by the
preg_replace from P800.php.
class SyncML_Device_Nokia extends SyncML_Device {
function convertClient2Server($content, $contentType)
{
$GLOBALS['backend']->logFile(
SYNCML_LOGFILE_DATA,
"\nInput received from client
($contentType):\n$content\n");
// Always remove client UID. UID will be seperately passed in
XML.
$content = preg_replace('/(\r\n|\r|\n)UID:.*?(\r\n|\r|\n)/',
'\1', $content, 1);
/* E51 sends categories as "X-Category". Remove the "X-": */
$content = preg_replace('/(\r\n|\r|\n)CATEGORIES:X-/',
'\1CATEGORIES:',
$content, 1);
return array($content, $contentType);
}
Can't say anything about other Nokia Devices ...
Martin
More information about the bugs
mailing list