aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2011-02-24 20:59:19 -0500
committerOleg Pudeyev <oleg@bsdpower.com>2011-02-24 20:59:19 -0500
commitee0db1a1d5f0150016d0971057f889f2366f9856 (patch)
treeb08d0b98244541ba8b31fc3e24f01e883b08bcd2 /phpBB/includes/functions_posting.php
parent76ad7c938d7834c09c98b6759dca4a196eb3c29b (diff)
parent904bcb86a054ab6256da565098eb9bd8ab20414b (diff)
downloadforums-ee0db1a1d5f0150016d0971057f889f2366f9856.tar
forums-ee0db1a1d5f0150016d0971057f889f2366f9856.tar.gz
forums-ee0db1a1d5f0150016d0971057f889f2366f9856.tar.bz2
forums-ee0db1a1d5f0150016d0971057f889f2366f9856.tar.xz
forums-ee0db1a1d5f0150016d0971057f889f2366f9856.zip
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/9874] view_log() performs unneeded count query over all log entries. [ticket/7834] Topic time didn't update when first post was deleted [ticket/9997] Fixed an inconsistency in the Moderator Control Panel [ticket/9872] Removed some useless code that broke delete_posts
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 74b5b405a1..61cc096e26 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -1480,7 +1480,7 @@ function delete_post($forum_id, $topic_id, $post_id, &$data)
break;
case 'delete_first_post':
- $sql = 'SELECT p.post_id, p.poster_id, p.post_username, u.username, u.user_colour
+ $sql = 'SELECT p.post_id, p.poster_id, p.post_time, p.post_username, u.username, u.user_colour
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . " u
WHERE p.topic_id = $topic_id
AND p.poster_id = u.user_id
@@ -1494,7 +1494,7 @@ function delete_post($forum_id, $topic_id, $post_id, &$data)
$sql_data[FORUMS_TABLE] = ($data['post_approved']) ? 'forum_posts = forum_posts - 1' : '';
}
- $sql_data[TOPICS_TABLE] = 'topic_poster = ' . intval($row['poster_id']) . ', topic_first_post_id = ' . intval($row['post_id']) . ", topic_first_poster_colour = '" . $db->sql_escape($row['user_colour']) . "', topic_first_poster_name = '" . (($row['poster_id'] == ANONYMOUS) ? $db->sql_escape($row['post_username']) : $db->sql_escape($row['username'])) . "'";
+ $sql_data[TOPICS_TABLE] = 'topic_poster = ' . intval($row['poster_id']) . ', topic_first_post_id = ' . intval($row['post_id']) . ", topic_first_poster_colour = '" . $db->sql_escape($row['user_colour']) . "', topic_first_poster_name = '" . (($row['poster_id'] == ANONYMOUS) ? $db->sql_escape($row['post_username']) : $db->sql_escape($row['username'])) . "', topic_time = " . (int) $row['post_time'];
// Decrementing topic_replies here is fine because this case only happens if there is more than one post within the topic - basically removing one "reply"
$sql_data[TOPICS_TABLE] .= ', topic_replies_real = topic_replies_real - 1' . (($data['post_approved']) ? ', topic_replies = topic_replies - 1' : '');