diff options
author | Charly Root <root@muse-sequencer.org> | 2013-10-08 00:29:50 +0200 |
---|---|---|
committer | Charly Root <root@muse-sequencer.org> | 2013-10-08 00:29:50 +0200 |
commit | 36a04305b45bcb29a24c9cd859aed2fe376ddcbb (patch) | |
tree | f638c413f35d8869d07ecc0ce3c15274f2c12a00 /src | |
parent | a1632d25fc46d130357c23c2304b5b73be8894f1 (diff) |
Diffstat (limited to 'src')
-rw-r--r-- | src/PhpBB3Impl.php | 5 | ||||
-rw-r--r-- | src/build_email.php | 1 | ||||
-rwxr-xr-x | src/postfix_handoff.pl | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/PhpBB3Impl.php b/src/PhpBB3Impl.php index cc6d400..07c4469 100644 --- a/src/PhpBB3Impl.php +++ b/src/PhpBB3Impl.php @@ -216,7 +216,7 @@ class PhpBB3Impl implements PhpBB3 { $subject = $msg->getSubject(); // FIXME: list tag should not be hard-coded - $listTag = '[messages]'; + $listTag = '[CONFIG_TODO]'; $forumName = $this->getForumName($forumId); $forumTag = '[' . html_entity_decode($forumName, ENT_QUOTES) . ']'; $subject = build_post_subject($listTag, $forumTag, $subject, $postType == 'reply'); @@ -225,7 +225,8 @@ class PhpBB3Impl implements PhpBB3 { # FIXME: extract the footer pattern into a config file? # strip the list footer - $message = strip_list_footer($message, "/^_______________________________________________\\r\\nmessages mailing list\\r\\nmessages@vassalengine.org\\r\\nhttp:\/\/www.vassalengine.org\/mailman\/listinfo\/messages.*/ms"); + # CONFIG_TODO: don't forget to add \\r\\n as newline and escape / with \/ + $message = strip_list_footer($message, "/^_______________________________________________\\r\\nTest-list mailing list\\r\\nTest-list@muse-sequencer.org\\r\\nhttp:\/\/muse-sequencer.org\/cgi-bin\/mailman\/listinfo\/test-list.*/ms"); # TODO: convert > quoting into BBCode diff --git a/src/build_email.php b/src/build_email.php index 57d22a2..6881acc 100644 --- a/src/build_email.php +++ b/src/build_email.php @@ -18,6 +18,7 @@ EOF; function build_email_footer($postId, $forumURL) { $postURL = "$forumURL/viewtopic.php?p=$postId#p$postId"; + # maybe CONFIG_TODO $footer = <<<EOF _______________________________________________ diff --git a/src/postfix_handoff.pl b/src/postfix_handoff.pl index f0e2697..0678ff7 100755 --- a/src/postfix_handoff.pl +++ b/src/postfix_handoff.pl @@ -24,7 +24,7 @@ use HTTP::Request::Common qw(POST); local $/; my $msg = <STDIN>; -my $url = 'http://localhost/list_post_receive.php'; +my $url = 'http://CONFIG_TODO/list_post_receive.php'; # probably localhost my $ua = LWP::UserAgent->new; my $req = POST $url, [ message => $msg ]; |