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.php4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/PhpBB3Impl.php b/src/PhpBB3Impl.php
index af1d977..06b0427 100644
--- a/src/PhpBB3Impl.php
+++ b/src/PhpBB3Impl.php
@@ -212,7 +212,7 @@ class PhpBB3Impl implements PhpBB3 {
# FIXME: extract the footer pattern into a config file?
# strip the list footer
- $message = preg_replace("/^_______________________________________________\\r\\nmessages mailing list\\r\\nmessages@vassalengine.org\\r\\nhttp:\/\/www.vassalengine.org\/mailman\/listinfo\/messages.*/ms", '', $message);
+ $message = strip_list_footer($message, "/^_______________________________________________\\r\\nmessages mailing list\\r\\nmessages@vassalengine.org\\r\\nhttp:\/\/www.vassalengine.org\/mailman\/listinfo\/messages.*/ms");
# TODO: convert > quoting into BBCode
diff --git a/src/build_post.php b/src/build_post.php
index d889b92..d6d23a7 100644
--- a/src/build_post.php
+++ b/src/build_post.php
@@ -25,4 +25,8 @@ function build_post_subject($listtag, $forumtag, $subject, $reply) {
return $subject;
}
+function strip_list_footer($message, $fpattern) {
+ return preg_replace($fpattern, '', $message);
+}
+
?>