Add a few trims to remove any excess newlines ... hopefully this won't cause problems ...

git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@3138 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2002-11-28 02:36:37 +00:00
parent c2ef430e67
commit 84e3c54967

View file

@ -68,7 +68,7 @@ class emailer
// //
function set_subject($subject = '') function set_subject($subject = '')
{ {
$this->subject = preg_replace('#[\n\r]+#s', '', $subject); $this->subject = trim(preg_replace('#[\n\r]+#s', '', $subject));
} }
// //
@ -158,7 +158,7 @@ class emailer
if (preg_match('#^(Charset:(.*?))$#m', $this->msg, $match)) if (preg_match('#^(Charset:(.*?))$#m', $this->msg, $match))
{ {
$this->encoding = (trim($match[2]) != '') ? trim($match[2]) : $lang['ENCODING']; $this->encoding = (trim($match[2]) != '') ? trim($match[2]) : trim($lang['ENCODING']);
$drop_header .= '[\r\n]*?' . $match[1]; $drop_header .= '[\r\n]*?' . $match[1];
} }
@ -191,7 +191,7 @@ class emailer
// Add date and encoding type // Add date and encoding type
// //
$universal_extra = "MIME-Version: 1.0\nContent-type: text/plain; charset=" . $this->encoding . "\nContent-transfer-encoding: 8bit\nDate: " . gmdate('D, d M Y H:i:s', time()) . " UT\n"; $universal_extra = "MIME-Version: 1.0\nContent-type: text/plain; charset=" . $this->encoding . "\nContent-transfer-encoding: 8bit\nDate: " . gmdate('D, d M Y H:i:s', time()) . " UT\n";
$this->extra_headers = $universal_extra . $this->extra_headers . " ---\n\n"; $this->extra_headers = $universal_extra . trim($this->extra_headers);
if ( $this->use_smtp ) if ( $this->use_smtp )
{ {