mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-09 21:08:53 +00:00
[feature/prune-users] Cosmetic changes per bantu's review.
PHPBB3-9622
This commit is contained in:
parent
a1fee699dd
commit
15d2f294c6
2 changed files with 7 additions and 7 deletions
|
@ -333,7 +333,8 @@ class acp_prune
|
||||||
}
|
}
|
||||||
|
|
||||||
$s_group_list = '';
|
$s_group_list = '';
|
||||||
$sql = 'SELECT group_id, group_name FROM ' . GROUPS_TABLE . '
|
$sql = 'SELECT group_id, group_name
|
||||||
|
FROM ' . GROUPS_TABLE . '
|
||||||
WHERE group_type <> ' . GROUP_SPECIAL . '
|
WHERE group_type <> ' . GROUP_SPECIAL . '
|
||||||
ORDER BY group_name ASC';
|
ORDER BY group_name ASC';
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
@ -403,7 +404,7 @@ class acp_prune
|
||||||
// so that our time range is a full day instead of 1 second
|
// so that our time range is a full day instead of 1 second
|
||||||
if ($joined_after == $joined_before)
|
if ($joined_after == $joined_before)
|
||||||
{
|
{
|
||||||
$joined_after[2] += 1; //$joined_after[2]++;
|
$joined_after[2] += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$joined_sql = ' AND user_regdate BETWEEN ' . gmmktime(0, 0, 0, (int) $joined_after[1], (int) $joined_after[2], (int) $joined_after[0]) . ' AND ' . gmmktime(0, 0, 0, (int) $joined_before[1], (int) $joined_before[2], (int) $joined_before[0]);
|
$joined_sql = ' AND user_regdate BETWEEN ' . gmmktime(0, 0, 0, (int) $joined_after[1], (int) $joined_after[2], (int) $joined_after[0]) . ' AND ' . gmmktime(0, 0, 0, (int) $joined_before[1], (int) $joined_before[2], (int) $joined_before[0]);
|
||||||
|
|
|
@ -365,8 +365,7 @@ function user_delete($mode, $user_ids, $retain_username = true)
|
||||||
// Before we begin, we will remove the reports the user issued.
|
// Before we begin, we will remove the reports the user issued.
|
||||||
$sql = 'SELECT r.post_id, p.topic_id
|
$sql = 'SELECT r.post_id, p.topic_id
|
||||||
FROM ' . REPORTS_TABLE . ' r, ' . POSTS_TABLE . ' p
|
FROM ' . REPORTS_TABLE . ' r, ' . POSTS_TABLE . ' p
|
||||||
WHERE ' . $db->sql_in_set('r.user_id', $user_ids) . //r.user_id = ' . $user_id . '
|
WHERE ' . $db->sql_in_set('r.user_id', $user_ids) . '
|
||||||
'
|
|
||||||
AND p.post_id = r.post_id';
|
AND p.post_id = r.post_id';
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
@ -554,13 +553,13 @@ function user_delete($mode, $user_ids, $retain_username = true)
|
||||||
// Change user_id to anonymous for this users triggered events
|
// Change user_id to anonymous for this users triggered events
|
||||||
$sql = 'UPDATE ' . LOG_TABLE . '
|
$sql = 'UPDATE ' . LOG_TABLE . '
|
||||||
SET user_id = ' . ANONYMOUS . '
|
SET user_id = ' . ANONYMOUS . '
|
||||||
WHERE ' . $user_id_sql; //user_id = ' . $user_id;
|
WHERE ' . $user_id_sql;
|
||||||
$db->sql_query($sql);
|
$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_sql . //user_id = ' . $user_id . '
|
WHERE ' . $user_id_sql . '
|
||||||
' OR ' . $db->sql_in_set('zebra_id', $user_ids);
|
OR ' . $db->sql_in_set('zebra_id', $user_ids);
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
|
|
||||||
// Delete the user_id from the banlist
|
// Delete the user_id from the banlist
|
||||||
|
|
Loading…
Add table
Reference in a new issue