]> git.mxchange.org Git - friendica.git/commitdiff
only header encode if necessary
authorFriendika <info@friendika.com>
Mon, 19 Sep 2011 00:16:02 +0000 (17:16 -0700)
committerFriendika <info@friendika.com>
Mon, 19 Sep 2011 00:16:02 +0000 (17:16 -0700)
boot.php
include/email.php

index e073aee688c0d5f06f2044ba1bf1c4559bada94d..6e78b21f63e5d5dec19e172eb353512aa15729ff 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -7,7 +7,7 @@ require_once('include/text.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 ( 'DB_UPDATE_VERSION',      1087      );
 
index b3408454904dd13dad0e98d5ec902966dcf22d1b..3e6a8186d8fb9eafdc541696220aa3d2d4e16935 100644 (file)
@@ -169,6 +169,17 @@ function email_get_part($mbox,$uid,$p,$partno) {
 
 function email_header_encode($in_str, $charset) {
     $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) {
 
         // define start delimimter, end delimiter and spacer