|
From: Paul S. O. <ps...@us...> - 2002-03-01 15:46:54
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv10261/includes
Modified Files:
emailer.php
Log Message:
Add ability to specify subject within email, format is Subject: (localised subject) followed by carriage return/newline.
Index: emailer.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/emailer.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** emailer.php 28 Jan 2002 21:03:25 -0000 1.10
--- emailer.php 1 Mar 2002 15:46:49 -0000 1.11
***************
*** 72,78 ****
// set up subject for mail
//
! function set_subject($subject)
{
! $this->subject = $subject;
}
--- 72,82 ----
// set up subject for mail
//
! 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]);
}
|