1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 12:03:21 +01:00

Fix bug #40245 - Attachments table is not being updated when deleting user and retaining his posts

Authorised by: acydburn

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9599 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Ruslan Uzdenov 2009-06-16 14:36:12 +00:00
parent ce144ab0ba
commit bfc8906a5e
2 changed files with 6 additions and 0 deletions

View File

@ -109,6 +109,7 @@
<li>[Fix] Incorrect layout when loading PM-draft (Bug #38435 - Patch by nickvergessen)</li>
<li>[Fix] Wrong message shown to user, when adding bots to friends/foes. (Bug #40205 - Patch by nickvergessen)</li>
<li>[Fix] Fix Oracle database backup (Bug #46715)</li>
<li>[Fix] Update attachments table when deleting user and retaining his posts. (Bug #40245 - Patch by rxu)</li>
<li>[Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.</li>
<li>[Change] Add index on log_time to the log table to prevent slowdown on boards with many log entries. (Bug #44665 - Patch by bantu)</li>
<li>[Change] Template engine now permits to a limited extent variable includes.</li>

View File

@ -421,6 +421,11 @@ function user_delete($mode, $user_id, $post_username = false)
WHERE topic_last_poster_id = $user_id";
$db->sql_query($sql);
$sql = 'UPDATE ' . ATTACHMENTS_TABLE . '
SET poster_id = ' . ANONYMOUS . "
WHERE poster_id = $user_id";
$db->sql_query($sql);
// Since we change every post by this author, we need to count this amount towards the anonymous user
// Update the post count for the anonymous user