diff options
author | uckelman <uckelman@nomic.net> | 2010-04-11 21:33:08 +0000 |
---|---|---|
committer | uckelman <uckelman@nomic.net> | 2010-04-11 21:33:08 +0000 |
commit | e39c305315715202d956b4f78a9f32bfd623d8eb (patch) | |
tree | c7c87bbb675fa84dbbe98332518a21b1add80f00 /src/F2M.php | |
parent | 78969b6d3adb9e3162754207a5a57a3a1e58fd4f (diff) |
Added getPostTime().
git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6687 67b53d14-2c14-4ace-a08f-0dab2b34000c
Diffstat (limited to 'src/F2M.php')
-rw-r--r-- | src/F2M.php | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/F2M.php b/src/F2M.php index 980aca8..5933f36 100644 --- a/src/F2M.php +++ b/src/F2M.php @@ -9,6 +9,10 @@ catch (Exception $e) { function send_to_lists($user, $data, $post_data) { + require_once(__DIR__ . '/PhpBB3.php'); + + $phpbb = new PhpBB3(); + /* require_once('Mail.php'); @@ -21,14 +25,15 @@ function send_to_lists($user, $data, $post_data) { $userName = $user->data['username']; $userEmail = $user->data['user_email']; - $date = $data['post_time']; $subject = $post_data['post_subject']; + $date = $phpbb->getPostTime($postId); $body = $data['message']; print '<p>'; var_dump($data); var_dump($post_data); + var_dump($date); print '</p>'; /* @@ -57,4 +62,16 @@ function send_to_lists($user, $data, $post_data) { } +function get_post_time($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['user_id'] : false; +} + ?> |