mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
Make sure only logs for existing users are displayed and user-specific logs removed on user deletion. (Bug #49855)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10053 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
19bae65f4c
commit
17f40511bf
4 changed files with 16 additions and 2 deletions
|
@ -199,6 +199,7 @@
|
||||||
<li>[Fix] Fix email problems on servers with PHP installations not accepting RFC-compliant subject string passed to the the mail()-function. (Bug #46725)</li>
|
<li>[Fix] Fix email problems on servers with PHP installations not accepting RFC-compliant subject string passed to the the mail()-function. (Bug #46725)</li>
|
||||||
<li>[Fix] Correctly orientate Control-Panel-Navigation background-image on RTL languages. (Bug #49945)</li>
|
<li>[Fix] Correctly orientate Control-Panel-Navigation background-image on RTL languages. (Bug #49945)</li>
|
||||||
<li>[Fix] Sort private messages by message time and not message id. (Bug #50015)</li>
|
<li>[Fix] Sort private messages by message time and not message id. (Bug #50015)</li>
|
||||||
|
<li>[Fix] Make sure only logs for existing users are displayed and user-specific logs removed on user deletion. (Bug #49855)</li>
|
||||||
<li>[Change] submit_post() now accepts force_approved_state key passed to $data to indicate new posts being approved (true) or unapproved (false).</li>
|
<li>[Change] submit_post() now accepts force_approved_state key passed to $data to indicate new posts being approved (true) or unapproved (false).</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] 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] Add index on log_time to the log table to prevent slowdown on boards with many log entries. (Bug #44665 - Patch by bantu)</li>
|
||||||
|
|
|
@ -2744,8 +2744,9 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = 'SELECT COUNT(l.log_id) AS total_entries
|
$sql = 'SELECT COUNT(l.log_id) AS total_entries
|
||||||
FROM ' . LOG_TABLE . " l
|
FROM ' . LOG_TABLE . ' l, ' . USERS_TABLE . " u
|
||||||
WHERE l.log_type = $log_type
|
WHERE l.log_type = $log_type
|
||||||
|
AND l.user_id = u.user_id
|
||||||
AND l.log_time >= $limit_days
|
AND l.log_time >= $limit_days
|
||||||
$sql_keywords
|
$sql_keywords
|
||||||
$sql_forum";
|
$sql_forum";
|
||||||
|
|
|
@ -538,6 +538,17 @@ function user_delete($mode, $user_id, $post_username = false)
|
||||||
|
|
||||||
$cache->destroy('sql', MODERATOR_CACHE_TABLE);
|
$cache->destroy('sql', MODERATOR_CACHE_TABLE);
|
||||||
|
|
||||||
|
// Delete user log entries about this user
|
||||||
|
$sql = 'DELETE FROM ' . LOG_TABLE . '
|
||||||
|
WHERE reportee_id = ' . $user_id;
|
||||||
|
$db->sql_query($sql);
|
||||||
|
|
||||||
|
// Change user_id to anonymous for this users triggered events
|
||||||
|
$sql = 'UPDATE ' . LOG_TABLE . '
|
||||||
|
SET user_id = ' . ANONYMOUS . '
|
||||||
|
WHERE user_id = ' . $user_id;
|
||||||
|
$db->sql_query($sql);
|
||||||
|
|
||||||
// Delete the user_id from the zebra table
|
// Delete the user_id from the zebra table
|
||||||
$sql = 'DELETE FROM ' . ZEBRA_TABLE . '
|
$sql = 'DELETE FROM ' . ZEBRA_TABLE . '
|
||||||
WHERE user_id = ' . $user_id . '
|
WHERE user_id = ' . $user_id . '
|
||||||
|
|
|
@ -556,6 +556,7 @@ function approve_post($post_id_list, $id, $mode)
|
||||||
|
|
||||||
$post_approve_sql[] = $post_id;
|
$post_approve_sql[] = $post_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
$post_id_list = array_values(array_diff($post_id_list, $post_approved_list));
|
$post_id_list = array_values(array_diff($post_id_list, $post_approved_list));
|
||||||
for ($i = 0, $size = sizeof($post_approved_list); $i < $size; $i++)
|
for ($i = 0, $size = sizeof($post_approved_list); $i < $size; $i++)
|
||||||
{
|
{
|
||||||
|
@ -834,7 +835,7 @@ function disapprove_post($post_id_list, $id, $mode)
|
||||||
'post_subject' => $post_info[$post_id]['post_subject'],
|
'post_subject' => $post_info[$post_id]['post_subject'],
|
||||||
'forum_id' => $post_info[$post_id]['forum_id'],
|
'forum_id' => $post_info[$post_id]['forum_id'],
|
||||||
'topic_id' => $post_info[$post_id]['topic_id'],
|
'topic_id' => $post_info[$post_id]['topic_id'],
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue