summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);