do NOT return iCalendar for displayable body, mail triggers calendar meeting display from attachment

This commit is contained in:
Ralf Becker 2015-10-22 14:34:35 +00:00
parent d3f688760f
commit a8e13d4526

View File

@ -2662,7 +2662,7 @@ class emailadmin_imapbase
{ {
foreach($nameSpace as $k => $singleNameSpace) { foreach($nameSpace as $k => $singleNameSpace) {
$type = $singleNameSpace['type']; $type = $singleNameSpace['type'];
if(is_array($singleNameSpace) && $singleNameSpace['prefix']){ if(is_array($singleNameSpace) && $singleNameSpace['prefix']){
$prefixes[$type] = $singleNameSpace['prefix']; $prefixes[$type] = $singleNameSpace['prefix'];
//regard extra care for nameSpacequeries when configured AND respect $_search //regard extra care for nameSpacequeries when configured AND respect $_search
@ -2676,9 +2676,9 @@ class emailadmin_imapbase
} }
} }
} }
$autofolders = array(); $autofolders = array();
foreach(self::$specialUseFolders as $path => $folder) foreach(self::$specialUseFolders as $path => $folder)
{ {
if ($this->folderExists($path)) if ($this->folderExists($path))
@ -2691,7 +2691,7 @@ class emailadmin_imapbase
{ {
return $this->getFolderArrays ($_nodePath, $_onlyTopLevel, $_search, $_subscribedOnly, $_getCounter); return $this->getFolderArrays ($_nodePath, $_onlyTopLevel, $_search, $_subscribedOnly, $_getCounter);
} }
// now process topFolders for next level // now process topFolders for next level
foreach ($topFolders as &$node) foreach ($topFolders as &$node)
{ {
@ -2741,7 +2741,7 @@ class emailadmin_imapbase
} }
if (is_array($aFolders)) uasort ($aFolders, array($this,'sortByAutofolder')); if (is_array($aFolders)) uasort ($aFolders, array($this,'sortByAutofolder'));
//ksort($aFolders); //ksort($aFolders);
// Sort none auto folders base on mailbox name // Sort none auto folders base on mailbox name
uasort($nFolders,array($this,'sortByMailbox')); uasort($nFolders,array($this,'sortByMailbox'));
@ -4151,7 +4151,6 @@ class emailadmin_imapbase
} }
/** /**
* getMultipartAlternative
* get part of the message, if its stucture is indicating its of multipart alternative style * get part of the message, if its stucture is indicating its of multipart alternative style
* a wrapper for multipartmixed * a wrapper for multipartmixed
* @param string/int $_uid the messageuid, * @param string/int $_uid the messageuid,
@ -4187,11 +4186,6 @@ class emailadmin_imapbase
case 'text': case 'text':
switch($mimePart->getSubType()) switch($mimePart->getSubType())
{ {
case 'calendar': // only if there is no partText set already
//if ($partText) break;
if ($mimePart->getBytes() > 0) $partCalendar = $mimePart;
break;
// fall throught
case 'plain': case 'plain':
if ($mimePart->getBytes() > 0) $partText = $mimePart; if ($mimePart->getBytes() > 0) $partText = $mimePart;
break; break;
@ -4224,9 +4218,6 @@ class emailadmin_imapbase
} }
} }
} }
// seems we have a multipart/alternative; as we assume we are able to display events
// the text/calendar part has higher precedence then text/plain
if ($partCalendar && $partText) $partText = $partCalendar;
switch($_htmlMode) switch($_htmlMode)
{ {