From 5d56c751906a02df1f69f745ace594c2d7f43a54 Mon Sep 17 00:00:00 2001 From: uckelman Date: Fri, 30 Apr 2010 18:05:32 +0000 Subject: Get current time for edited posts. git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6792 67b53d14-2c14-4ace-a08f-0dab2b34000c --- src/F2M.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/F2M.php b/src/F2M.php index 37802f3..9eff271 100644 --- a/src/F2M.php +++ b/src/F2M.php @@ -47,9 +47,16 @@ function send_post_to_lists($config, $user, $mode, $data, $post_data) { $phpbb = new PhpBB3(); - $time = $phpbb->getPostTime($postId); - if ($time === false) { - throw new Exception('no post time: ' . $postId); + $time = null; + if ($mode == 'edit') { + # Post time is NOT updated when posts are edited; we get the current time + $time = time(); + } + else { + $time = $phpbb->getPostTime($postId); + if ($time === false) { + throw new Exception('no post time: ' . $postId); + } } $date = date(DATE_RFC2822, $time); -- cgit v1.2.3