diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php index 53ffbf05..ba847589 100644 --- a/plugins/calendar/calendar.php +++ b/plugins/calendar/calendar.php @@ -774,18 +774,6 @@ class calendar extends rcube_plugin } break; } - - // send out notifications - if ($success && $event['_notify'] && ($event['attendees'] || $old['attendees'])) { - // make sure we have the complete record - $event = $action == 'remove' ? $old : $this->driver->get_event($event); - - // only notify if data really changed (TODO: do diff check on client already) - if (!$old || $action == 'remove' || self::event_diff($event, $old)) { - if ($this->notify_attendees($event, $old, $action) < 0) - $this->rc->output->show_message('calendar.errornotifying', 'error'); - } - } // show confirmation/error message if (!$got_msg) { @@ -795,6 +783,21 @@ class calendar extends rcube_plugin $this->rc->output->show_message('calendar.errorsaving', 'error'); } + // send out notifications + if ($success && $event['_notify'] && ($event['attendees'] || $old['attendees'])) { + // make sure we have the complete record + $event = $action == 'remove' ? $old : $this->driver->get_event($event); + + // only notify if data really changed (TODO: do diff check on client already) + if (!$old || $action == 'remove' || self::event_diff($event, $old)) { + $sent = $this->notify_attendees($event, $old, $action); + if ($sent > 0) + $this->rc->output->show_message('calendar.itipsendsuccess', 'confirmation'); + else if ($sent < 0) + $this->rc->output->show_message('calendar.errornotifying', 'error'); + } + } + // unlock client $this->rc->output->command('plugin.unlock_saving'); diff --git a/plugins/calendar/localization/de_CH.inc b/plugins/calendar/localization/de_CH.inc index 12614dd5..254bc01f 100644 --- a/plugins/calendar/localization/de_CH.inc +++ b/plugins/calendar/localization/de_CH.inc @@ -180,6 +180,7 @@ $labels['newerversionexists'] = 'Eine neuere Version dieses Termins exisitert be $labels['nowritecalendarfound'] = 'Kein Kalender zum Speichern gefunden'; $labels['importedsuccessfully'] = 'Der Termin wurde erfolgreich in \'$calendar\' gespeichert'; $labels['attendeupdateesuccess'] = 'Teilnehmerstatus erfolgreich aktualisiert'; +$labels['itipsendsuccess'] = 'Einladung an Teilnehmer versendet.'; $labels['itipresponseerror'] = 'Die Antwort auf diese Einladung konnte nicht versendet werden'; $labels['sentresponseto'] = 'Antwort auf diese Einladung erfolgreich an $mailto gesendet'; $labels['localchangeswarning'] = 'Die Änderungen an diesem Termin können nur in Ihrem persönlichen Kalender gespeichert werden.'; diff --git a/plugins/calendar/localization/de_DE.inc b/plugins/calendar/localization/de_DE.inc index 7c0d00f6..028c625c 100644 --- a/plugins/calendar/localization/de_DE.inc +++ b/plugins/calendar/localization/de_DE.inc @@ -180,6 +180,7 @@ $labels['newerversionexists'] = 'Eine neuere Version dieses Termins exisitert be $labels['nowritecalendarfound'] = 'Kein Kalender zum Speichern gefunden'; $labels['importedsuccessfully'] = 'Der Termin wurde erfolgreich in \'$calendar\' gespeichert'; $labels['attendeupdateesuccess'] = 'Teilnehmerstatus erfolgreich aktualisiert'; +$labels['itipsendsuccess'] = 'Einladung an Teilnehmer versendet.'; $labels['itipresponseerror'] = 'Die Antwort auf diese Einladung konnte nicht versendet werden'; $labels['sentresponseto'] = 'Antwort auf diese Einladung erfolgreich an $mailto gesendet'; $labels['localchangeswarning'] = 'Die Änderungen an diesem Termin können nur in Ihrem persönlichen Kalender gespeichert werden.'; diff --git a/plugins/calendar/localization/en_US.inc b/plugins/calendar/localization/en_US.inc index 2137b390..174cc1aa 100644 --- a/plugins/calendar/localization/en_US.inc +++ b/plugins/calendar/localization/en_US.inc @@ -180,6 +180,7 @@ $labels['newerversionexists'] = 'A newer version of this event already exists! A $labels['nowritecalendarfound'] = 'No calendar found to save the event'; $labels['importedsuccessfully'] = 'The event was successfully added to \'$calendar\''; $labels['attendeupdateesuccess'] = 'Successfully updated the participant\'s status'; +$labels['itipsendsuccess'] = 'Invitation sent to participants.'; $labels['itipresponseerror'] = 'Failed to send the response to this event invitation'; $labels['itipinvalidrequest'] = 'This invitation is no longer valid'; $labels['sentresponseto'] = 'Successfully sent invitation response to $mailto';