diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-03-01 16:43:32 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-03-01 16:43:32 +0000 |
commit | 19c55abb19e5889eb41ed765d1ee75b7caa44b89 (patch) | |
tree | 72ac3a15628ced074306248c8c6af3fffd1edcdb | |
parent | 08fc672b8bd059d4eb07d4723499374971c8b6de (diff) | |
download | forums-19c55abb19e5889eb41ed765d1ee75b7caa44b89.tar forums-19c55abb19e5889eb41ed765d1ee75b7caa44b89.tar.gz forums-19c55abb19e5889eb41ed765d1ee75b7caa44b89.tar.bz2 forums-19c55abb19e5889eb41ed765d1ee75b7caa44b89.tar.xz forums-19c55abb19e5889eb41ed765d1ee75b7caa44b89.zip |
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
-rwxr-xr-x | phpBB/includes/emailer.php | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/phpBB/includes/emailer.php b/phpBB/includes/emailer.php index eceaaca492..d9e5fba2e4 100755 --- a/phpBB/includes/emailer.php +++ b/phpBB/includes/emailer.php @@ -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; } |