summaryrefslogtreecommitdiff
path: root/src/F2M.php
diff options
context:
space:
mode:
authoruckelman <uckelman@nomic.net>2010-04-13 22:06:32 +0000
committeruckelman <uckelman@nomic.net>2010-04-13 22:06:32 +0000
commit5500ac2e1beacd4a15cdb2715649749b9adae8c5 (patch)
tree09ecd1677b60e57fd8fb3b827354bd41262b59a4 /src/F2M.php
parent36a4efb0d72f69a25a14d93c05fc587739915273 (diff)
Get post_id from table on reply.
git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6711 67b53d14-2c14-4ace-a08f-0dab2b34000c
Diffstat (limited to 'src/F2M.php')
-rw-r--r--src/F2M.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/F2M.php b/src/F2M.php
index 786b038..0b6d9dc 100644
--- a/src/F2M.php
+++ b/src/F2M.php
@@ -17,7 +17,6 @@ function send_to_lists($user, $mode, $data, $post_data) {
$postId = $data['post_id'];
$forumId = $data['forum_id'];
- $topidId = $post_data['topic_id'];
$bridge = new Bridge();
@@ -49,6 +48,11 @@ function send_to_lists($user, $mode, $data, $post_data) {
$references = null;
if ($mode == 'reply') {
+ $topicId = $phpbb->getTopicId($postId);
+ if ($topicId === false) {
+ throw new Exception('unrecognized post id: ' . $postId);
+ }
+
$firstId = $phpbb->getFirstPostId($topicId);
if ($firstId === false) {
throw new Exception('topic has no first post: ' . $topicId);