make sure the content type map is available on accessing a known/wanted attachment part

This commit is contained in:
Klaus Leithoff 2013-11-20 10:00:16 +00:00
parent 8e336ed31a
commit 9bc3c57239
2 changed files with 3 additions and 1 deletions

View File

@ -4462,6 +4462,7 @@ class mail_bo
if ($_partID != '')
{
$mailStructureObject = $_headerObject->getStructure();
$mailStructureObject->contentTypeMap();
$part = $mailStructureObject->getPart($_partID);
if ($part->getDisposition()=='attachment')
{
@ -4727,7 +4728,7 @@ class mail_bo
}
else
{
$attachments[$num] = array_merge($attachments[$num],$mailClass->getAttachment($uid, $attachment['partID']));
$attachments[$num] = array_merge($attachments[$num],$mailClass->getAttachment($uid, $attachment['partID'],0,false,false));
if (isset($attachments[$num]['charset'])) {
if ($attachments[$num]['charset']===false) $attachments[$num]['charset'] = translation::detect_encoding($attachments[$num]['attachment']);
translation::convert($attachments[$num]['attachment'],$attachments[$num]['charset']);

View File

@ -1108,6 +1108,7 @@ unset($query['actions']);
$sRToFetch = null;
$_folderName=(!empty($query['selectedFolder'])?$query['selectedFolder']:$this->mail_bo->profileID.self::$delimiter.'INBOX');
list($_profileID,$folderName) = explode(self::$delimiter,$_folderName,2);
if (strpos($folderName,self::$delimiter)!==false) list($app,$_profileID,$folderName) = explode(self::$delimiter,$_folderName,3);
if (is_numeric($_profileID))
{
if ($_profileID && $_profileID != $this->mail_bo->profileID)