From 10d724069c00f8f9378d90ce3151518dd888c6cb Mon Sep 17 00:00:00 2001 From: uckelman Date: Thu, 29 Jul 2010 13:17:21 +0000 Subject: * Added license. * Added list footer stripping. git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@7049 67b53d14-2c14-4ace-a08f-0dab2b34000c --- src/PhpBB3.php | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/PhpBB3.php b/src/PhpBB3.php index 7e1b148..59f1d43 100644 --- a/src/PhpBB3.php +++ b/src/PhpBB3.php @@ -1,5 +1,25 @@ . +# + require_once(__DIR__ . '/Util.php'); # phpBB setup @@ -181,7 +201,10 @@ class PhpBB3 { $subject = $msg->getSubject(); list($message, $attachments) = $msg->getFlattenedParts(); -# TODO: strip off list footer +# FIXME: extract the footer pattern into a config file? + # strip the list footer + $message = preg_replace("/^_______________________________________________\nmessages mailing list\nmessages@vassalengine.org\nhttp:\/\/www.vassalengine.org\/mailman\/listinfo\/messages.*/ms", '', $message); + # TODO: convert > quoting into BBCode # handle attachments @@ -201,6 +224,7 @@ class PhpBB3 { $user->session_create($userId); $auth->acl($user->data); +# FIXME: strip list and forum tag from subject $subject = utf8_normalize_nfc($subject); $message = utf8_normalize_nfc($message); -- cgit v1.2.3