summaryrefslogtreecommitdiff
path: root/plugins/calendar
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2015-02-23 09:58:45 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2015-02-23 09:58:58 (GMT)
commit029892575072fd940f6d13582932472298957c43 (patch)
treeebd6649dfd4e17131efa8ef6909edd3619c40837 /plugins/calendar
parentbbd5770eda5e1e32cbbcc28bc802423a3b3b55c7 (diff)
downloadroundcubemail-plugins-kolab-029892575072fd940f6d13582932472298957c43.tar.gz
Support iTip messages to single occurrences in static RSVP UI for external invitees
Diffstat (limited to 'plugins/calendar')
-rw-r--r--plugins/calendar/lib/calendar_itip.php11
-rw-r--r--plugins/calendar/skins/larry/calendar.css9
2 files changed, 17 insertions, 3 deletions
diff --git a/plugins/calendar/lib/calendar_itip.php b/plugins/calendar/lib/calendar_itip.php
index 5622372..e2a2402 100644
--- a/plugins/calendar/lib/calendar_itip.php
+++ b/plugins/calendar/lib/calendar_itip.php
@@ -152,12 +152,14 @@ class calendar_itip extends libcalendaring_itip
// delete old entry
$this->rc->db->query("DELETE FROM $this->db_itipinvitations WHERE `token` = ?", $base);
+ $event_uid = $event['uid'] . ($event['_instance'] ? '-' . $event['_instance'] : '');
+
$query = $this->rc->db->query(
"INSERT INTO $this->db_itipinvitations
(`token`, `event_uid`, `user_id`, `event`, `expires`)
VALUES(?, ?, ?, ?, ?)",
$base,
- $event['uid'],
+ $event_uid,
$this->rc->user->ID,
self::serialize_event($event),
date('Y-m-d H:i:s', $event['end']->format('U') + 86400 * 2)
@@ -178,12 +180,14 @@ class calendar_itip extends libcalendaring_itip
*/
public function cancel_itip_invitation($event)
{
+ $event_uid = $event['uid'] . ($event['_instance'] ? '-' . $event['_instance'] : '');
+
// flag invitation record as cancelled
$this->rc->db->query(
"UPDATE $this->db_itipinvitations
SET `cancelled` = 1
WHERE `event_uid` = ? AND `user_id` = ?",
- $event['uid'],
+ $event_uid,
$this->rc->user->ID
);
}
@@ -196,7 +200,8 @@ class calendar_itip extends libcalendaring_itip
*/
public function generate_token($event, $attendee)
{
- $base = sha1($event['uid'] . ';' . $this->rc->user->ID);
+ $event_uid = $event['uid'] . ($event['_instance'] ? '-' . $event['_instance'] : '');
+ $base = sha1($event_uid . ';' . $this->rc->user->ID);
$mail = base64_encode($attendee);
$hash = substr(md5($base . $mail . $this->rc->config->get('des_key')), 0, 6);
diff --git a/plugins/calendar/skins/larry/calendar.css b/plugins/calendar/skins/larry/calendar.css
index fef16bd..4229b1a 100644
--- a/plugins/calendar/skins/larry/calendar.css
+++ b/plugins/calendar/skins/larry/calendar.css
@@ -2316,3 +2316,12 @@ div.calendar-invitebox .calendar-agenda-preview .event-date {
font-size: 120%;
}
+.calendaritipattend .itip-reply-controls .noreply-toggle,
+.calendaritipattend .itip-reply-controls #noreply-event-rsvp {
+ display: none;
+}
+
+.calendaritipattend .itip-reply-controls a.reply-comment-toggle {
+ margin-left: 2px;
+}
+