summaryrefslogtreecommitdiff
path: root/src/F2M.php
diff options
context:
space:
mode:
authoruckelman <uckelman@nomic.net>2010-04-30 18:05:32 +0000
committeruckelman <uckelman@nomic.net>2010-04-30 18:05:32 +0000
commit5d56c751906a02df1f69f745ace594c2d7f43a54 (patch)
treeb1a5b77e809a050ed06185ee7954b1a4be852922 /src/F2M.php
parentd26a31b54b8705eb4b65a8c60b017a579b7bf67c (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
Diffstat (limited to 'src/F2M.php')
-rw-r--r--src/F2M.php13
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);