From e39c305315715202d956b4f78a9f32bfd623d8eb Mon Sep 17 00:00:00 2001 From: uckelman Date: Sun, 11 Apr 2010 21:33:08 +0000 Subject: Added getPostTime(). git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6687 67b53d14-2c14-4ace-a08f-0dab2b34000c --- src/PhpBB3.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/PhpBB3.php') diff --git a/src/PhpBB3.php b/src/PhpBB3.php index aca8333..48361a6 100644 --- a/src/PhpBB3.php +++ b/src/PhpBB3.php @@ -108,6 +108,18 @@ class PhpBB3 { } } + public function getPostTime($postId) { + throw_if_null($postId); + + global $db; + + $sql = 'SELECT post_time FROM ' . POSTS_TABLE . ' ' . + 'WHERE post_id = ' . $postId; + + $row = $this->get_exactly_one_row($sql); + return $row ? $row['post_time'] : false; + } + public function postMessage($postType, $forumId, $topicId, $msg) { throw_if_null($msg); -- cgit v1.2.3