Add ability to specify subject within email, format is Subject: (localised subject) followed by carriage return/newline.

git-svn-id: file:///svn/phpbb/trunk@2235 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2002-03-01 15:46:49 +00:00
parent 4256b8534d
commit a54b016790

View file

@ -71,9 +71,13 @@ class emailer
//
// set up subject for mail
//
function set_subject($subject)
function set_subject($subject = '')
{
$this->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]);
}
//