summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2015-01-24 17:58:31 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2015-01-24 17:58:31 (GMT)
commit79e07cc1d6531f31ddb85874fba6b4596934005f (patch)
tree948ffd2adb14b38533a8d7f3c8761bce36f6446a /plugins
parentd7a799da3c4fab35b51bea4ef12485fc1626697a (diff)
downloadroundcubemail-plugins-kolab-79e07cc1d6531f31ddb85874fba6b4596934005f.tar.gz
Fix bug where removing attachment in event dialog wasn't possible after upload (#4288)
When redundant_attachments or database_attachments plugin was enabled the ID of uploaded file contained ":" character which was invalid in HTML and css selector didn't work.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/calendar/calendar.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php
index cde78fc..db61d47 100644
--- a/plugins/calendar/calendar.php
+++ b/plugins/calendar/calendar.php
@@ -1756,7 +1756,7 @@ class calendar extends rcube_plugin
*/
public function attachment_upload()
{
- $this->lib->attachment_upload(self::SESSION_KEY, 'cal:');
+ $this->lib->attachment_upload(self::SESSION_KEY, 'cal-');
}
/**
@@ -1820,7 +1820,8 @@ class calendar extends rcube_plugin
}
$attachments = array();
- $eventid = 'cal:'.$event['id'];
+ $eventid = 'cal-'.$event['id'];
+
if (is_array($_SESSION[self::SESSION_KEY]) && $_SESSION[self::SESSION_KEY]['id'] == $eventid) {
if (!empty($_SESSION[self::SESSION_KEY]['attachments'])) {
foreach ($_SESSION[self::SESSION_KEY]['attachments'] as $id => $attachment) {
@@ -2957,7 +2958,7 @@ class calendar extends rcube_plugin
}
// copy mail attachments to event
else if ($message->attachments) {
- $eventid = 'cal:';
+ $eventid = 'cal-';
if (!is_array($_SESSION[self::SESSION_KEY]) || $_SESSION[self::SESSION_KEY]['id'] != $eventid) {
$_SESSION[self::SESSION_KEY] = array();
$_SESSION[self::SESSION_KEY]['id'] = $eventid;