mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-03 15:27:42 +02:00
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:
@@ -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));
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -152,13 +152,13 @@ class emailer
|
|||||||
$match = array();
|
$match = array();
|
||||||
if (preg_match('#^(Subject:(.*?))$#m', $this->msg, $match))
|
if (preg_match('#^(Subject:(.*?))$#m', $this->msg, $match))
|
||||||
{
|
{
|
||||||
$this->subject = ( $this->subject != '' ) ? $this->subject : trim($match[2]);
|
$this->subject = ($this->subject != '') ? $this->subject : trim($match[2]);
|
||||||
$drop_header .= '[\r\n]*?' . $match[1];
|
$drop_header .= '[\r\n]*?' . $match[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
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 )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user