diff options
author | uckelman <uckelman@nomic.net> | 2010-04-30 18:05:32 +0000 |
---|---|---|
committer | uckelman <uckelman@nomic.net> | 2010-04-30 18:05:32 +0000 |
commit | 5d56c751906a02df1f69f745ace594c2d7f43a54 (patch) | |
tree | b1a5b77e809a050ed06185ee7954b1a4be852922 | |
parent | d26a31b54b8705eb4b65a8c60b017a579b7bf67c (diff) |
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
-rw-r--r-- | src/F2M.php | 13 |
1 files changed, 10 insertions, 3 deletions
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); |