From: Jason M. <jm...@us...> - 2002-07-29 05:19:34
|
Update of /cvsroot/squirrelmail/squirrelmail/functions In directory usw-pr-cvs1:/tmp/cvs-serv18170/functions Modified Files: Tag: SM-1_2-STABLE smtp.php Log Message: fix for bug # 585836 Index: smtp.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/functions/smtp.php,v retrieving revision 1.161 retrieving revision 1.161.2.1 diff -u -w -r1.161 -r1.161.2.1 --- smtp.php 20 May 2002 11:36:52 -0000 1.161 +++ smtp.php 29 Jul 2002 05:19:32 -0000 1.161.2.1 @@ -158,17 +158,15 @@ if ($rn == "\r\n"){ $tmp = str_replace("\n", "\r\n", $tmp); } - /** - * Check if the last line has newline ($rn) in it - * and append if it doesn't. - */ - if ($fp && feof($fp) && !strstr($tmp, "$rn")){ - $tmp .= $rn; - } if ($fp) { fputs($fp, $tmp); } $length += strlen($tmp); + } + if (substr($tmp, strlen($tmp) - strlen($rn), strlen($rn)) != $rn) { + if ($fp) { + fputs($fp, $rn); + } } } else { $header .= "Content-Transfer-Encoding: base64" |