summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2012-12-18 13:08:20 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2012-12-18 13:36:14 (GMT)
commitdb49e053e27507e8c221b34ea910523451ac8c72 (patch)
tree18f3b99e7e3b027c769d2b3c3a097050efbdf48c
parent625859b6611615d4c521177d50deeb34e9585417 (diff)
downloadroundcubemail-plugins-kolab-db49e053e27507e8c221b34ea910523451ac8c72.tar.gz
Fix bug where event attachments/participants were lost on event move (#1480)
-rw-r--r--plugins/calendar/calendar.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php
index c632376..8d38a6a 100644
--- a/plugins/calendar/calendar.php
+++ b/plugins/calendar/calendar.php
@@ -637,7 +637,7 @@ class calendar extends rcube_plugin
case "move":
$this->prepare_event($event, $action);
$success = $this->driver->move_event($event);
- $reload = $success && $event['_savemode'] ? 2 : 1;
+ $reload = $success && $event['_savemode'] ? 2 : 1;
break;
case "remove":
@@ -1586,6 +1586,11 @@ class calendar extends rcube_plugin
$event['start'] = new DateTime(is_numeric($event['start']) ? '@'.$event['start'] : $event['start'], $this->user_timezone);
$event['end'] = new DateTime(is_numeric($event['end']) ? '@'.$event['end'] : $event['end'], $this->user_timezone);
+ // start/end is all we need for 'move' action (#1480)
+ if ($action == 'move') {
+ return;
+ }
+
if ($event['recurrence']['UNTIL'])
$event['recurrence']['UNTIL'] = new DateTime($event['recurrence']['UNTIL'], $this->user_timezone);