plugins/libkolab

Aleksander Machniak machniak at kolabsys.com
Fri Apr 5 11:17:42 CEST 2013


 plugins/libkolab/lib/kolab_storage_folder.php |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 1df25c1984927cdc5e7c04871de5a9d947d2b76b
Author: Aleksander Machniak <machniak at kolabsys.com>
Date:   Fri Apr 5 11:17:16 2013 +0200

    Skip charset conversion when it's not needed

diff --git a/plugins/libkolab/lib/kolab_storage_folder.php b/plugins/libkolab/lib/kolab_storage_folder.php
index fe17d63..2c6f04c 100644
--- a/plugins/libkolab/lib/kolab_storage_folder.php
+++ b/plugins/libkolab/lib/kolab_storage_folder.php
@@ -947,10 +947,11 @@ class kolab_storage_folder
         // save object attachments as separate parts
         foreach ((array)$object['_attachments'] as $key => $att) {
             if (empty($att['content']) && !empty($att['id'])) {
+                // @TODO: use IMAP CATENATE to skip attachment fetch+push operation
                 $msguid = !empty($object['_msguid']) ? $object['_msguid'] : $object['uid'];
                 if ($is_file) {
                     $att['path'] = tempnam($temp_dir, 'rcmAttmnt');
-                    if (($fp = fopen($att['path'], 'w')) && $this->get_attachment($msguid, $att['id'], $object['_mailbox'], false, $fp)) {
+                    if (($fp = fopen($att['path'], 'w')) && $this->get_attachment($msguid, $att['id'], $object['_mailbox'], false, $fp, true)) {
                         fclose($fp);
                     }
                     else {
@@ -958,7 +959,7 @@ class kolab_storage_folder
                     }
                 }
                 else {
-                    $att['content'] = $this->get_attachment($msguid, $att['id'], $object['_mailbox']);
+                    $att['content'] = $this->get_attachment($msguid, $att['id'], $object['_mailbox'], false, null, true);
                 }
             }
 





More information about the commits mailing list