Implement undelete with new storage backend; remove cruft
This commit is contained in:
parent
ff90fa64f9
commit
6973bbcaee
2 changed files with 11 additions and 5 deletions
|
@ -352,7 +352,17 @@ class kolab_calendar
|
|||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -401,7 +401,6 @@ class kolab_driver extends calendar_driver
|
|||
}
|
||||
}
|
||||
|
||||
$GLOBALS['conf']['kolab']['no_triggering'] = true;
|
||||
$success = $storage->insert_event($event);
|
||||
|
||||
if ($success)
|
||||
|
@ -472,7 +471,6 @@ class kolab_driver extends calendar_driver
|
|||
$master = $event;
|
||||
|
||||
$this->rc->session->remove('calendar_restore_event_data');
|
||||
$GLOBALS['conf']['kolab']['no_triggering'] = true;
|
||||
|
||||
// read master if deleting a recurring event
|
||||
if ($event['recurrence'] || $event['recurrence_id']) {
|
||||
|
@ -614,8 +612,6 @@ class kolab_driver extends calendar_driver
|
|||
if ($old['recurrence']['EXDATE'])
|
||||
$event['recurrence']['EXDATE'] = $old['recurrence']['EXDATE'];
|
||||
|
||||
$GLOBALS['conf']['kolab']['no_triggering'] = true;
|
||||
|
||||
switch ($savemode) {
|
||||
case 'new':
|
||||
// save submitted data as new (non-recurring) event
|
||||
|
|
Loading…
Add table
Reference in a new issue