Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
fa3b0568
Commit
fa3b0568
authored
Oct 27, 2014
by
alexpott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2361757
by rpayanm: Remove usage of mime_header_encode().
parent
579fdc4c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
core/lib/Drupal/Core/Mail/Plugin/Mail/PhpMail.php
core/lib/Drupal/Core/Mail/Plugin/Mail/PhpMail.php
+3
-2
core/modules/file/file.module
core/modules/file/file.module
+1
-1
No files found.
core/lib/Drupal/Core/Mail/Plugin/Mail/PhpMail.php
View file @
fa3b0568
...
...
@@ -7,6 +7,7 @@
namespace
Drupal\Core\Mail\Plugin\Mail
;
use
Drupal\Component\Utility\Unicode
;
use
Drupal\Core\Mail\MailInterface
;
use
Drupal\Core\Site\Settings
;
...
...
@@ -65,11 +66,11 @@ public function mail(array $message) {
}
$mimeheaders
=
array
();
foreach
(
$message
[
'headers'
]
as
$name
=>
$value
)
{
$mimeheaders
[]
=
$name
.
': '
.
mime
_h
eader
_e
ncode
(
$value
);
$mimeheaders
[]
=
$name
.
': '
.
Unicode
::
mime
H
eader
E
ncode
(
$value
);
}
$line_endings
=
Settings
::
get
(
'mail_line_endings'
,
PHP_EOL
);
// Prepare mail commands.
$mail_subject
=
mime
_h
eader
_e
ncode
(
$message
[
'subject'
]);
$mail_subject
=
Unicode
::
mime
H
eader
E
ncode
(
$message
[
'subject'
]);
// Note: email uses CRLF for line-endings. PHP's API requires LF
// on Unix and CRLF on Windows. Drupal automatically guesses the
// line-ending format appropriate for your system. If you need to
...
...
core/modules/file/file.module
View file @
fa3b0568
...
...
@@ -532,7 +532,7 @@ function file_save_data($data, $destination = NULL, $replace = FILE_EXISTS_RENAM
* \Symfony\Component\HttpFoundation\StreamedResponse.
*/
function
file_get_content_headers
(
FileInterface
$file
)
{
$type
=
mime
_h
eader
_e
ncode
(
$file
->
getMimeType
());
$type
=
Unicode
::
mime
H
eader
E
ncode
(
$file
->
getMimeType
());
return
array
(
'Content-Type'
=>
$type
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment