diff options
author | uckelman <uckelman@nomic.net> | 2010-04-30 21:38:50 +0000 |
---|---|---|
committer | uckelman <uckelman@nomic.net> | 2010-04-30 21:38:50 +0000 |
commit | e3f6bc31ff1e108de52faae926d96a73df32557e (patch) | |
tree | a2cb04492d116aeb686355f3451249a624135de6 /src | |
parent | 340fc57f4573f7b623edad830244f1f5096ab8ab (diff) |
mv M2F.php list_post_receive.php.
git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6797 67b53d14-2c14-4ace-a08f-0dab2b34000c
Diffstat (limited to 'src')
-rw-r--r-- | src/list_post_receive.php (renamed from src/M2F.php) | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/M2F.php b/src/list_post_receive.php index a8d2749..0896324 100644 --- a/src/M2F.php +++ b/src/list_post_receive.php @@ -1,5 +1,8 @@ <?php +# TODO: logging! +# TODO: translation of quoting to bbcode? + try { require_once(__DIR__ . '/Bridge.php'); require_once(__DIR__ . '/MailmanLib.php'); @@ -17,10 +20,10 @@ try { $rererences = $msg->getReferences(); $bridge = new Bridge(); - $seen = !$bridge->registerMessage(null, $messageId, $inReplyTo); + $editId = $bridge->registerByMessageId($messageId, $inReplyTo); try { - if ($seen) { + if ($editId === false) { # This message has already been processed, bail out print 'Message id already seen, skipping: ' . $messageId . "\n"; exit; @@ -28,14 +31,14 @@ try { $phpbb = new PhpBB3(); - $forumId = $topicId = -1; + $forumId = $topicId = null; $postType = null; if ($inReplyTo) { # Possibly a reply to an existing topic $parentId = $bridge->getPostId($inReplyTo); if ($parentId === false) { - throw new Exception('unrecognized reply-to: ' . $inReplyTo); + throw new Exception('unrecognized Reply-To: ' . $inReplyTo); } $ids = $phpbb->getTopicAndForumIds($parentId); @@ -67,7 +70,7 @@ try { } catch (Exception $e) { # Bridging failed, unregister message. - $bridge->unregisterMessage($messageId); + $bridge->unregisterMessage($editId); throw $e; } } |