aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/emailer.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/emailer.php')
-rwxr-xr-xphpBB/includes/emailer.php8
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]);
}
//