diff options
| author | Joas Schilling <nickvergessen@gmx.de> | 2009-07-22 11:47:37 +0000 |
|---|---|---|
| committer | Joas Schilling <nickvergessen@gmx.de> | 2009-07-22 11:47:37 +0000 |
| commit | 818b252f208b92157b56b101aac555eb1efb8cee (patch) | |
| tree | d5757e59dc52e0635e9bf47aa9817b9b242fb5c8 /phpBB/includes/acp/acp_users.php | |
| parent | 2dfd327828a5f6387ea051aa9e588f39249ed059 (diff) | |
| download | forums-818b252f208b92157b56b101aac555eb1efb8cee.tar forums-818b252f208b92157b56b101aac555eb1efb8cee.tar.gz forums-818b252f208b92157b56b101aac555eb1efb8cee.tar.bz2 forums-818b252f208b92157b56b101aac555eb1efb8cee.tar.xz forums-818b252f208b92157b56b101aac555eb1efb8cee.zip | |
fix r9758
Authorised by: AcydBurn
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9828 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_users.php')
| -rw-r--r-- | phpBB/includes/acp/acp_users.php | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index cb342ac300..7921b6df67 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -1160,11 +1160,13 @@ class acp_users if ($deleteall) { - $deleted_warnings = '0'; + $log_warnings = $deleted_warnings = 0; } else { - $deleted_warnings = ' user_warnings - ' . $db->sql_affectedrows(); + $num_warnings = (int) $db->sql_affectedrows(); + $deleted_warnings = ' user_warnings - ' . $num_warnings; + $log_warnings = ($num_warnings > 2) ? 2 : $num_warnings; } $sql = 'UPDATE ' . USERS_TABLE . " @@ -1172,7 +1174,18 @@ class acp_users WHERE user_id = $user_id"; $db->sql_query($sql); - add_log('admin', 'LOG_WARNING_DELETED', $user_row['username']); + switch ($log_warnings) + { + case 2: + add_log('admin', 'LOG_WARNINGS_DELETED', $user_row['username'], $num_warnings); + break; + case 1: + add_log('admin', 'LOG_WARNING_DELETED', $user_row['username']); + break; + default: + add_log('admin', 'LOG_WARNINGS_DELETED_ALL', $user_row['username']); + break; + } } } else |
