From d2add5242438b72a4cb228a511c59d3199f9e355 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 15 Nov 2012 12:37:56 +0100 Subject: [PATCH] Extend get_attachment() with arguments available in rcube_imap::get_message_part() --- plugins/libkolab/lib/kolab_storage_folder.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/plugins/libkolab/lib/kolab_storage_folder.php b/plugins/libkolab/lib/kolab_storage_folder.php index 302efd63..2c589737 100644 --- a/plugins/libkolab/lib/kolab_storage_folder.php +++ b/plugins/libkolab/lib/kolab_storage_folder.php @@ -389,17 +389,21 @@ class kolab_storage_folder * Fetch a Kolab object attachment which is stored in a separate part * of the mail MIME message that represents the Kolab record. * - * @param string Object's UID - * @param string The attachment's mime number - * @param string IMAP folder where message is stored; - * If set, that also implies that the given UID is an IMAP UID + * @param string Object's UID + * @param string The attachment's mime number + * @param string IMAP folder where message is stored; + * If set, that also implies that the given UID is an IMAP UID + * @param bool True to print the part content + * @param resource File pointer to save the message part + * @param boolean Disables charset conversion + * * @return mixed The attachment content as binary string */ - public function get_attachment($uid, $part, $mailbox = null) + public function get_attachment($uid, $part, $mailbox = null, $print = false, $fp = null, $skip_charset_conv = false) { if ($msguid = ($mailbox ? $uid : $this->cache->uid2msguid($uid))) { $this->imap->set_folder($mailbox ? $mailbox : $this->name); - return $this->imap->get_message_part($msguid, $part); + return $this->imap->get_message_part($msguid, $part, null, $print, $fp, $skip_charset_conv); } return null;