0010900: .eml attachments can't be opened
authorPhilipp Schüle <p.schuele@metaways.de>
Sat, 11 Apr 2015 18:59:12 +0000 (20:59 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 13 Apr 2015 14:23:55 +0000 (16:23 +0200)
* apply patch submitted by jan

https://forge.tine20.org/view.php?id=10900

Change-Id: Ibe8f4bea80011e0f05f190c11650bb4785de33c5
Reviewed-on: http://gerrit.tine20.com/customers/1817
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Felamimail/Controller/Message.php

index 81d9ade..b47d996 100644 (file)
@@ -221,6 +221,7 @@ class Felamimail_Controller_Message extends Tinebase_Controller_Record_Abstract
             $structure = $_message->getPartStructure($_partId, FALSE);
             
             $message = new Felamimail_Model_Message(array(
+                'account_id'  => $_message->account_id,
                 'messageuid'  => $_message->messageuid,
                 'folder_id'   => $_message->folder_id,
                 'received'    => $_message->received,
@@ -782,8 +783,10 @@ class Felamimail_Controller_Message extends Tinebase_Controller_Record_Abstract
         
         if (Tinebase_Core::isLogLevel(Zend_Log::TRACE)) Tinebase_Core::getLogger()->trace(__METHOD__ . '::' . __LINE__ 
             . ' Fetched Headers: ' . $rawHeaders);
-        
-        Zend_Mime_Decode::splitMessage($rawHeaders, $headers, $null);
+
+        $headers = array();
+        $body = null;
+        Zend_Mime_Decode::splitMessage($rawHeaders, $headers, $body);
         
         $cache->save($headers, $cacheId, array('getMessageHeaders'), 86400);
         
@@ -813,7 +816,7 @@ class Felamimail_Controller_Message extends Tinebase_Controller_Record_Abstract
             if ($_select) {
                 if (Tinebase_Core::isLogLevel(Zend_Log::TRACE)) Tinebase_Core::getLogger()->trace(__METHOD__ . '::' . __LINE__ 
                     . ' Select folder ' . $_folder->globalname);
-                $backendFolderValues = $imapBackend->selectFolder(Felamimail_Model_Folder::encodeFolderName($_folder->globalname));
+                $imapBackend->selectFolder(Felamimail_Model_Folder::encodeFolderName($_folder->globalname));
             }
         } catch (Zend_Mail_Storage_Exception $zmse) {
             // @todo remove the folder from cache if it could not be found on the IMAP server?