summaryrefslogtreecommitdiff
path: root/src/build_email.php
diff options
context:
space:
mode:
authorJoel Uckelman <uckelman@nomic.net>2012-02-27 05:54:36 +0100
committerJoel Uckelman <uckelman@nomic.net>2012-02-27 05:54:36 +0100
commite66b736aa6c2e00643b9b061d7064c7991503390 (patch)
treef30b9e8b135b4785bc1b149046918668a9e67d03 /src/build_email.php
parent809671070efe8ff29c633e9be03d0d41a5cf6560 (diff)
Remove Edit marker from incoming mail, add it to outgoing mail.
Diffstat (limited to 'src/build_email.php')
-rw-r--r--src/build_email.php15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/build_email.php b/src/build_email.php
index a5bb7bd..567da0d 100644
--- a/src/build_email.php
+++ b/src/build_email.php
@@ -97,7 +97,7 @@ function build_email_from($name, $email) {
return sprintf('%s <%s>', $qname, $email);
}
-function build_email_subject($forumtag, $reply, $subject) {
+function build_email_subject($forumtag, $subject, $reply, $edit) {
$subject = trim($subject);
if ($subject == '') {
$subject = '(no subject)';
@@ -109,22 +109,21 @@ function build_email_subject($forumtag, $reply, $subject) {
$subject = 'Re: ' . $subject;
}
+ if ($edit) {
+ $subject = 'Edit: ' . $subject;
+ }
+
return utf8_quote_non_ascii($subject);
}
function build_email_headers(
- $userName, $userEmail, $to, $sender, $subject, $edit,
- $time, $messageId, $forumURL, $inReplyTo, $references)
+ $userName, $userEmail, $to, $sender, $subject, $time,
+ $messageId, $forumURL, $inReplyTo, $references)
{
$from = build_email_from($userName, $userEmail);
$subject = utf8_quote_non_ascii($subject);
$date = date(DATE_RFC2822, $time);
- if ($edit) {
- $edit_header = 'Edit: ';
- $subject = $edit_header . $subject;
- }
-
$headers = array(
'To' => $to,
'From' => $from,