com web/news: Add content-description to the attachment data returned: lib/fMailbox.php
| From: | Ben Ramsey | Date: | Sat, 23 Jan 2016 05:29:12 +0000 |
| Subject: | com web/news: Add content-description to the attachment data returned: lib/fMailbox.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-24519@lists.php.net to get a copy of this message | ||
Commit: 71281ddf2651979ddc26d640ced4e143c5e7dc5a
Author: Ben Ramsey <ben@benramsey.com> Sat, 23 Jan 2016 00:29:12 -0500
Parents: 708f60b43e1c9399a7453d87bbfb5b5f836d9b88
Branches: master
Link: http://git.php.net/?p=web/news.git;a=commitdiff;h=71281ddf2651979ddc26d640ced4e143c5e7dc5a
Log:
Add content-description to the attachment data returned
Changed paths:
M lib/fMailbox.php
Diff:
diff --git a/lib/fMailbox.php b/lib/fMailbox.php
index 1538e94..1d82b2e 100644
--- a/lib/fMailbox.php
+++ b/lib/fMailbox.php
@@ -235,7 +235,8 @@ class fMailbox
$info[$structure['disposition']][] = array(
'filename' => $filename,
'mimetype' => $structure['type'] . '/' .
$structure['subtype'],
- 'data' => $content
+ 'data' => $content,
+ 'description' => $structure['description'],
);
return $info;
}
@@ -552,6 +553,7 @@ class fMailbox
'encoding' => isset($headers['content-transfer-encoding']) ?
strtolower($headers['content-transfer-encoding']) : '8bit',
'disposition' => isset($headers['content-disposition']) ?
strtolower($headers['content-disposition']['value']) : null,
'disposition_fields' => isset($headers['content-disposition']) ?
$headers['content-disposition']['fields'] : array(),
+ 'description' => isset($headers['content-description']) ?
$headers['content-description'] : null,
'data' => $data
);
}