Update && move event - now ready.

This commit is contained in:
Bogomil Shopov 2011-06-13 16:36:46 +03:00
parent 7bc9f58fc8
commit f408cb1c64

View file

@ -178,8 +178,29 @@ class kolab_calendar
public function update_event($event)
{
return false;
$updated = false;
$old = $this->storage->getObject($event['id']);
$object = array_merge($old, $this->_from_rcube_event($event));
$saved = $this->storage->save($object, $event['id']);
if (PEAR::isError($saved)) {
raise_error(array(
'code' => 600, 'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
'message' => "Error saving contact object to Kolab server:" . $saved->getMessage()),
true, false);
}
else {
$updated = true;
}
return $updated;
}
public function delete_event($event)
{
return true;
}