mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Move subject preg_ to after parseing ... in case subject needs to contain any variables
git-svn-id: file:///svn/phpbb/trunk@2237 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
08fc672b8b
commit
19c55abb19
1 changed files with 11 additions and 5 deletions
|
@ -73,11 +73,7 @@ class emailer
|
|||
//
|
||||
function set_subject($subject = '')
|
||||
{
|
||||
$match = array();
|
||||
preg_match("/^(Subject:(.*?)[\r\n]+?)?(.*?)$/is", $this->msg, $match);
|
||||
|
||||
$this->msg = ( isset($match[3]) ) ? trim($match[3]) : "";
|
||||
$this->subject = ( $subject != '' ) ? $subject : trim($match[2]);
|
||||
$this->subject = $subject;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -167,6 +163,16 @@ class emailer
|
|||
|
||||
eval("\$this->msg = \"$this->msg\";");
|
||||
|
||||
//
|
||||
// We now try and pull a subject from the email body ... if it exists,
|
||||
// do this here because the subject may contain a variable
|
||||
//
|
||||
$match = array();
|
||||
preg_match("/^(Subject:(.*?)[\r\n]+?)?(.*?)$/is", $this->msg, $match);
|
||||
|
||||
$this->msg = ( isset($match[3]) ) ? trim($match[3]) : "";
|
||||
$this->subject = ( $this->subject != '' ) ? $this->subject : trim($match[2]);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue