aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2013-03-06 12:26:43 +0100
committerJoas Schilling <nickvergessen@gmx.de>2013-03-06 13:05:15 +0100
commite1f5e98fbca5c3f989a829fa763a471e04082e64 (patch)
tree995f8b510fece8876362af691c045041ce03b51f /phpBB/includes
parentd0d9005166d0647f2b6784b2391e7213f9a4447a (diff)
downloadforums-e1f5e98fbca5c3f989a829fa763a471e04082e64.tar
forums-e1f5e98fbca5c3f989a829fa763a471e04082e64.tar.gz
forums-e1f5e98fbca5c3f989a829fa763a471e04082e64.tar.bz2
forums-e1f5e98fbca5c3f989a829fa763a471e04082e64.tar.xz
forums-e1f5e98fbca5c3f989a829fa763a471e04082e64.zip
[ticket/9657] Correctly state when to refresh last/first post info on approving
PHPBB3-9657
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/mcp/mcp_queue.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php
index 01abdc82d8..0e835b0aa9 100644
--- a/phpBB/includes/mcp/mcp_queue.php
+++ b/phpBB/includes/mcp/mcp_queue.php
@@ -613,12 +613,14 @@ class mcp_queue
$topic_info[$topic_id]['posts'][] = (int) $post_id;
$topic_info[$topic_id]['forum_id'] = (int) $post_data['forum_id'];
- if ($post_id == $post_data['topic_first_post_id'])
+ // Refresh the first post, if the time or id is older then the current one
+ if ($post_id <= $post_data['topic_first_post_id'] || $post_data['post_time'] <= $post_data['topic_time'])
{
$topic_info[$topic_id]['first_post'] = true;
}
- if ($post_id == $post_data['topic_last_post_id'])
+ // Refresh the last post, if the time or id is newer then the current one
+ if ($post_id >= $post_data['topic_last_post_id'] || $post_data['post_time'] >= $post_data['topic_last_post_time'])
{
$topic_info[$topic_id]['last_post'] = true;
}