mirror of
https://github.com/friendica/friendica
synced 2024-11-13 00:22:59 +00:00
only header encode if necessary
This commit is contained in:
parent
5899c9f406
commit
e2e29b2dea
2 changed files with 12 additions and 1 deletions
2
boot.php
2
boot.php
|
@ -7,7 +7,7 @@ require_once('include/text.php');
|
||||||
require_once("include/pgettext.php");
|
require_once("include/pgettext.php");
|
||||||
|
|
||||||
|
|
||||||
define ( 'FRIENDIKA_VERSION', '2.2.1106' );
|
define ( 'FRIENDIKA_VERSION', '2.2.1107' );
|
||||||
define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
|
define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
|
||||||
define ( 'DB_UPDATE_VERSION', 1087 );
|
define ( 'DB_UPDATE_VERSION', 1087 );
|
||||||
|
|
||||||
|
|
|
@ -169,6 +169,17 @@ function email_get_part($mbox,$uid,$p,$partno) {
|
||||||
|
|
||||||
function email_header_encode($in_str, $charset) {
|
function email_header_encode($in_str, $charset) {
|
||||||
$out_str = $in_str;
|
$out_str = $in_str;
|
||||||
|
$need_to_convert = false;
|
||||||
|
|
||||||
|
for($x = 0; $x < strlen($in_str); $x ++) {
|
||||||
|
if((ord($in_str[$x]) == 0) || ((ord($in_str[$x]) > 128))) {
|
||||||
|
$need_to_convert = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(! $need_to_convert)
|
||||||
|
return $in_str;
|
||||||
|
|
||||||
if ($out_str && $charset) {
|
if ($out_str && $charset) {
|
||||||
|
|
||||||
// define start delimimter, end delimiter and spacer
|
// define start delimimter, end delimiter and spacer
|
||||||
|
|
Loading…
Reference in a new issue