From 75b8b2f4a4a3f1a1c803bf630afbcc77e92b3f8a Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 4 Jan 2011 18:51:19 +0000 Subject: [PATCH] using servertime timestamps for birthdate and adding direction to server for birthdate, category is still missing --- .../inc/class.addressbook_activesync.inc.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/addressbook/inc/class.addressbook_activesync.inc.php b/addressbook/inc/class.addressbook_activesync.inc.php index f228be9831..d09fc62c8a 100644 --- a/addressbook/inc/class.addressbook_activesync.inc.php +++ b/addressbook/inc/class.addressbook_activesync.inc.php @@ -325,8 +325,8 @@ class addressbook_activesync implements activesync_plugin_write, activesync_plug if (!empty($contact[$attr])) $message->$key = base64_encode($contact[$attr]); break; - case 'bday': - if (!empty($contact[$attr])) $message->$key = egw_time::to($contact[$attr],'ts'); + case 'bday': // zpush uses timestamp in servertime + if (!empty($contact[$attr])) $message->$key = egw_time::to($contact[$attr],'server'); break; case 'cat_id': @@ -486,14 +486,19 @@ class addressbook_activesync implements activesync_plugin_write, activesync_plug //put rtf into body if($rtf_body->out <> "") $message->body=$rtf_body->out; } - if (!empty(self::$mapping[$key])) $contact[$attr] = $message->body; + $contact[$attr] = $message->body; break; + + case 'bday': // zpush uses timestamp in servertime + $contact[$attr] = $message->$key ? date('Y-m-d',$message->$key) : null; + break; + case 'jpegphoto': - if (!empty(self::$mapping[$key])) $contact[$attr] = base64_decode($message->$key); + $contact[$attr] = base64_decode($message->$key); break; default: - if (!empty(self::$mapping[$key])) $contact[$attr] = $message->$key; + $contact[$attr] = $message->$key; break; } }