diff options
author | Joel Uckelman <uckelman@nomic.net> | 2012-03-01 03:35:38 +0100 |
---|---|---|
committer | Joel Uckelman <uckelman@nomic.net> | 2012-03-01 03:35:38 +0100 |
commit | bd8187cbbbd09b5c47ad31c74023597c8005f7d6 (patch) | |
tree | ade8bccc447c877bbfd996c3b07b73a1d235c6f6 /src | |
parent | 39ed0e2ce2abd2377552ea5af36fa25cf1b66a3f (diff) |
build_post should prepend Re: for replies.
Diffstat (limited to 'src')
-rw-r--r-- | src/PhpBB3Impl.php | 2 | ||||
-rw-r--r-- | src/build_post.php | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/PhpBB3Impl.php b/src/PhpBB3Impl.php index 59f052f..7e8595a 100644 --- a/src/PhpBB3Impl.php +++ b/src/PhpBB3Impl.php @@ -206,7 +206,7 @@ class PhpBB3Impl implements PhpBB3 { $listTag = '[messages]'; $forumName = $this->getForumName($forumId); $forumTag = '[' . html_entity_decode($forumName, ENT_QUOTES) . ']'; - $subject = build_post_subject($listTag, $forumTag, $subject); + $subject = build_post_subject($listTag, $forumTag, $subject, $postType == 'reply'); list($message, $attachments) = $msg->getFlattenedParts(); diff --git a/src/build_post.php b/src/build_post.php index 9039dcb..d889b92 100644 --- a/src/build_post.php +++ b/src/build_post.php @@ -1,6 +1,6 @@ <?php -function build_post_subject($listtag, $forumtag, $subject) { +function build_post_subject($listtag, $forumtag, $subject, $reply) { // strip the '[list]' and '[forum]' tags $tagpat = '/(' . preg_quote($listtag, '/') . '|' . preg_quote($forumtag, '/') . ')\\s*/'; @@ -18,6 +18,10 @@ function build_post_subject($listtag, $forumtag, $subject) { $subject = '(no subject)'; } + if ($reply) { + $subject = 'Re: ' . $subject; + } + return $subject; } |