summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/PhpBB3.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/PhpBB3.php b/src/PhpBB3.php
index 48361a6..ca75c24 100644
--- a/src/PhpBB3.php
+++ b/src/PhpBB3.php
@@ -120,6 +120,18 @@ class PhpBB3 {
return $row ? $row['post_time'] : false;
}
+ public function getFirstPostId($topicId) {
+ throw_if_null($topicId);
+
+ global $db;
+
+ $sql = 'SELECT topic_first_post_id FROM ' . TOPICS_TABLE . ' ' .
+ 'WHERE topic_id = ' . $topicId;
+
+ $row = $this->get_exactly_one_row($sql);
+ return $row ? $row['topic_first_post_id'] : false;
+ }
+
public function postMessage($postType, $forumId, $topicId, $msg) {
throw_if_null($msg);