diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-03-01 15:46:49 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-03-01 15:46:49 +0000 |
commit | a54b0167906f06e69b8697b2c25da8e7377878f2 (patch) | |
tree | 8af07ed586a8a5cb68dbae4e6e8eea38d4af8ffa /phpBB | |
parent | 4256b8534d93d015997dd5cde39857251ae2965e (diff) | |
download | forums-a54b0167906f06e69b8697b2c25da8e7377878f2.tar forums-a54b0167906f06e69b8697b2c25da8e7377878f2.tar.gz forums-a54b0167906f06e69b8697b2c25da8e7377878f2.tar.bz2 forums-a54b0167906f06e69b8697b2c25da8e7377878f2.tar.xz forums-a54b0167906f06e69b8697b2c25da8e7377878f2.zip |
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
Diffstat (limited to 'phpBB')
-rwxr-xr-x | phpBB/includes/emailer.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/phpBB/includes/emailer.php b/phpBB/includes/emailer.php index 12f1ba803e..eceaaca492 100755 --- a/phpBB/includes/emailer.php +++ b/phpBB/includes/emailer.php @@ -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]); } // |