|
From: Paul S. O. <ps...@us...> - 2002-03-01 16:43:36
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv26001/includes
Modified Files:
emailer.php
Log Message:
Move subject preg_ to after parseing ... in case subject needs to contain any variables
Index: emailer.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/emailer.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** emailer.php 1 Mar 2002 15:46:49 -0000 1.11
--- emailer.php 1 Mar 2002 16:43:32 -0000 1.12
***************
*** 74,82 ****
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]);
}
--- 74,78 ----
function set_subject($subject = '')
{
! $this->subject = $subject;
}
***************
*** 167,170 ****
--- 163,176 ----
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;
|