mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 00:37:42 +02:00
- fixed bug within the database update script
- #6254 - #6242 - #6184 - #6160 - #6020 git-svn-id: file:///svn/phpbb/trunk@6770 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -1324,12 +1324,12 @@ function delete_post($forum_id, $topic_id, $post_id, &$data)
|
||||
$db->sql_transaction('commit');
|
||||
|
||||
// Adjust posted info for this user by looking for a post by him/her within this topic...
|
||||
if ($post_mode != 'delete_topic' && $config['load_db_track'] && $user->data['is_registered'])
|
||||
if ($post_mode != 'delete_topic' && $config['load_db_track'] && $data['poster_id'] != ANONYMOUS)
|
||||
{
|
||||
$sql = 'SELECT poster_id
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE topic_id = ' . $topic_id . '
|
||||
AND poster_id = ' . $user->data['user_id'];
|
||||
AND poster_id = ' . $data['poster_id'];
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
$poster_id = (int) $db->sql_fetchfield('poster_id');
|
||||
$db->sql_freeresult($result);
|
||||
@@ -1339,7 +1339,7 @@ function delete_post($forum_id, $topic_id, $post_id, &$data)
|
||||
{
|
||||
$sql = 'DELETE FROM ' . TOPICS_POSTED_TABLE . '
|
||||
WHERE topic_id = ' . $topic_id . '
|
||||
AND user_id = ' . $user->data['user_id'];
|
||||
AND user_id = ' . $data['poster_id'];
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user