aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2008-07-28 13:23:42 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2008-07-28 13:23:42 +0000
commitf909a190d88f7f17d15cfca76c1e978bca32340d (patch)
treef3abd051936b7d95d9f45cd51d00fea8519043f8 /phpBB
parent0ce66e65520e2950d8e8288897a3b4263bc4bb8f (diff)
downloadforums-f909a190d88f7f17d15cfca76c1e978bca32340d.tar
forums-f909a190d88f7f17d15cfca76c1e978bca32340d.tar.gz
forums-f909a190d88f7f17d15cfca76c1e978bca32340d.tar.bz2
forums-f909a190d88f7f17d15cfca76c1e978bca32340d.tar.xz
forums-f909a190d88f7f17d15cfca76c1e978bca32340d.zip
Correctly set topic starter if first post in topic removed (Bug #30575 - Patch by blueray2048)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8690 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/functions_posting.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 72c4fd0728..03053412df 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -1437,7 +1437,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_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'])) . "'";
// 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' : '');