using servertime timestamps for birthdate and adding direction to server for birthdate, category is still missing

This commit is contained in:
Ralf Becker 2011-01-04 18:51:19 +00:00
parent 4915952262
commit 75b8b2f4a4

View File

@ -325,8 +325,8 @@ class addressbook_activesync implements activesync_plugin_write, activesync_plug
if (!empty($contact[$attr])) $message->$key = base64_encode($contact[$attr]); if (!empty($contact[$attr])) $message->$key = base64_encode($contact[$attr]);
break; break;
case 'bday': case 'bday': // zpush uses timestamp in servertime
if (!empty($contact[$attr])) $message->$key = egw_time::to($contact[$attr],'ts'); if (!empty($contact[$attr])) $message->$key = egw_time::to($contact[$attr],'server');
break; break;
case 'cat_id': case 'cat_id':
@ -486,14 +486,19 @@ class addressbook_activesync implements activesync_plugin_write, activesync_plug
//put rtf into body //put rtf into body
if($rtf_body->out <> "") $message->body=$rtf_body->out; if($rtf_body->out <> "") $message->body=$rtf_body->out;
} }
if (!empty(self::$mapping[$key])) $contact[$attr] = $message->body; $contact[$attr] = $message->body;
break; break;
case 'bday': // zpush uses timestamp in servertime
$contact[$attr] = $message->$key ? date('Y-m-d',$message->$key) : null;
break;
case 'jpegphoto': case 'jpegphoto':
if (!empty(self::$mapping[$key])) $contact[$attr] = base64_decode($message->$key); $contact[$attr] = base64_decode($message->$key);
break; break;
default: default:
if (!empty(self::$mapping[$key])) $contact[$attr] = $message->$key; $contact[$attr] = $message->$key;
break; break;
} }
} }