summaryrefslogtreecommitdiff
path: root/src/M2F.php
blob: 7dd56b0ac5a1cba3bc7ffd589e1bf66ec62170d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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());

?>