mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-09 17:37:02 +03:00
Cleanup attachment filenames
This commit is contained in:
parent
94bfe09f63
commit
7df3ed665d
3 changed files with 7 additions and 6 deletions
|
|
@ -67,7 +67,7 @@ class Attachment implements \JsonSerializable
|
|||
if ($this->oBodyStructure)
|
||||
{
|
||||
$sFileName = $this->oBodyStructure->FileName();
|
||||
if ($bCalculateOnEmpty && 0 === \strlen(trim($sFileName)))
|
||||
if ($bCalculateOnEmpty && !\strlen(\trim($sFileName)))
|
||||
{
|
||||
$sMimeType = \strtolower(\trim($this->MimeType()));
|
||||
if ('message/rfc822' === $sMimeType)
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class AttachmentCollection extends \MailSo\Base\Collection
|
|||
foreach ($this as $oAttachment) {
|
||||
$aResult[] = array(
|
||||
'@Object' => 'Object/Attachment',
|
||||
'FileName' => $oAttachment->FileName(true),
|
||||
'FileName' => $oAttachment->FileName(),
|
||||
'MimeType' => $oAttachment->MimeType(),
|
||||
'IsInline' => $oAttachment->IsInline()
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue