summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/PhpBB3Impl.php2
-rw-r--r--src/build_post.php6
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;
}