summaryrefslogtreecommitdiff
path: root/src/M2F.php
diff options
context:
space:
mode:
authoruckelman <uckelman@nomic.net>2010-04-11 15:14:07 +0000
committeruckelman <uckelman@nomic.net>2010-04-11 15:14:07 +0000
commit5a3cbc6324cf6e3185adf056cf6fd982969eb4fc (patch)
tree1dc4b4e863ecf21003ae311385208670d200e4da /src/M2F.php
parent4efb26e1be5a40537420734d3a7681f42cc47bd4 (diff)
Added list -> forum bridge.
git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6653 67b53d14-2c14-4ace-a08f-0dab2b34000c
Diffstat (limited to 'src/M2F.php')
-rw-r--r--src/M2F.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/M2F.php b/src/M2F.php
new file mode 100644
index 0000000..7dd56b0
--- /dev/null
+++ b/src/M2F.php
@@ -0,0 +1,34 @@
+<?php
+
+require_once(__DIR__ . '/Bridge.php');
+require_once(__DIR__ . '/MailmanLib.php');
+require_once(__DIR__ . '/MailmanMessage.php');
+require_once(__DIR__ . '/PhpBB3Lib.php');
+
+# Read the message from STDIN
+$url = 'php://stdin';
+
+$input = read_raw_message($url);
+$msg = new MailmanMessage($input);
+
+$user = get_user_id($msg->getFrom());
+$userName = get_user_name($userId);
+
+$bridge = new Bridge();
+
+$inReplyTo = $msg->getInReplyTo();
+
+if ($inReplyTo) {
+ # Is this a reply?
+# FIXME: we don't want exceptions here?
+ $parentId = $bridge->getPostId($inReplyTo);
+ $topicId = get_topic_id($parentId);
+}
+else {
+ # a new message
+
+}
+
+#$forumId = get_default_forum_id($msg->getSource());
+
+?>