summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2015-03-25 15:37:04 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2015-03-25 15:37:04 (GMT)
commitf96e93eec29ea1686a30a4986006d2eef9f46295 (patch)
treebd1abb7b268d0db37e0bb3f7b55766ba8a599cb0
parentc33c964bcd723bb39cc8f0c32f50a841bb094a89 (diff)
downloadroundcubemail-plugins-kolab-f96e93eec29ea1686a30a4986006d2eef9f46295.tar.gz
Fix loading attachments from old revisions
-rw-r--r--plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php3
-rw-r--r--plugins/tasklist/tasklist.js2
2 files changed, 3 insertions, 2 deletions
diff --git a/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php b/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php
index 8ba59de..9000d8f 100644
--- a/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php
+++ b/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php
@@ -717,8 +717,9 @@ class tasklist_kolab_driver extends tasklist_driver
$format->get_attachments($rec, true);
if ($format->is_valid()) {
+ $rec = self::_to_rcube_task($rec, $list_id, false);
$rec['rev'] = $result['rev'];
- return self::_to_rcube_task($rec, $list_id, false);
+ return $rec;
}
}
diff --git a/plugins/tasklist/tasklist.js b/plugins/tasklist/tasklist.js
index 514d060..d31a26d 100644
--- a/plugins/tasklist/tasklist.js
+++ b/plugins/tasklist/tasklist.js
@@ -2575,7 +2575,7 @@ function rcube_tasklist_ui(settings)
var query = { _id: att.id, _t: rec.recurrence_id||rec.id, _list:rec.list, _frame: 1 };
if (rec.rev)
- query._rev = event.rev;
+ query._rev = rec.rev;
// open attachment in frame if it's of a supported mimetype