Implement undelete with new storage backend; remove cruft

This commit is contained in:
Thomas Bruederli 2012-05-10 21:24:48 +02:00
parent ff90fa64f9
commit 6973bbcaee
2 changed files with 11 additions and 5 deletions

View file

@ -352,7 +352,17 @@ class kolab_calendar
*/ */
public function restore_event($event) public function restore_event($event)
{ {
// TODO: re-implement this with new kolab_storege backend if ($this->storage->undelete($event['id'])) {
return true;
}
else {
raise_error(array(
'code' => 600, 'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
'message' => "Error undeleting a contact object $uid from the Kolab server"),
true, false);
}
return false; return false;
} }

View file

@ -401,7 +401,6 @@ class kolab_driver extends calendar_driver
} }
} }
$GLOBALS['conf']['kolab']['no_triggering'] = true;
$success = $storage->insert_event($event); $success = $storage->insert_event($event);
if ($success) if ($success)
@ -472,7 +471,6 @@ class kolab_driver extends calendar_driver
$master = $event; $master = $event;
$this->rc->session->remove('calendar_restore_event_data'); $this->rc->session->remove('calendar_restore_event_data');
$GLOBALS['conf']['kolab']['no_triggering'] = true;
// read master if deleting a recurring event // read master if deleting a recurring event
if ($event['recurrence'] || $event['recurrence_id']) { if ($event['recurrence'] || $event['recurrence_id']) {
@ -614,8 +612,6 @@ class kolab_driver extends calendar_driver
if ($old['recurrence']['EXDATE']) if ($old['recurrence']['EXDATE'])
$event['recurrence']['EXDATE'] = $old['recurrence']['EXDATE']; $event['recurrence']['EXDATE'] = $old['recurrence']['EXDATE'];
$GLOBALS['conf']['kolab']['no_triggering'] = true;
switch ($savemode) { switch ($savemode) {
case 'new': case 'new':
// save submitted data as new (non-recurring) event // save submitted data as new (non-recurring) event