mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Fix a minor bug with deletions
git-svn-id: file:///svn/phpbb/trunk@5568 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
d6c8a4a1ae
commit
5cffb39239
1 changed files with 15 additions and 11 deletions
|
@ -112,13 +112,13 @@ function mcp_notes_user_view($id, $mode, $action)
|
||||||
|
|
||||||
$deletemark = ($action == 'del_marked') ? true : false;
|
$deletemark = ($action == 'del_marked') ? true : false;
|
||||||
$deleteall = ($action == 'del_all') ? true : false;
|
$deleteall = ($action == 'del_all') ? true : false;
|
||||||
$marked = request_var('marknote', 0);
|
$marked = request_var('marknote', array(0));
|
||||||
$usernote = request_var('usernote', '');
|
$usernote = request_var('usernote', '');
|
||||||
|
|
||||||
// Handle any actions
|
// Handle any actions
|
||||||
if (($deletemark || $deleteall) && $auth->acl_get('a_clearlogs'))
|
if (($deletemark || $deleteall) && $auth->acl_get('a_clearlogs'))
|
||||||
{
|
{
|
||||||
$where_sql = " AND reportee_id = $user_id";
|
$where_sql = '';
|
||||||
if ($deletemark && $marked)
|
if ($deletemark && $marked)
|
||||||
{
|
{
|
||||||
$sql_in = array();
|
$sql_in = array();
|
||||||
|
@ -130,17 +130,21 @@ function mcp_notes_user_view($id, $mode, $action)
|
||||||
unset($sql_in);
|
unset($sql_in);
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = 'DELETE FROM ' . LOG_TABLE . '
|
if ($where_sql || $deleteall)
|
||||||
WHERE log_type = ' . LOG_USERS . "
|
{
|
||||||
$where_sql";
|
$sql = 'DELETE FROM ' . LOG_TABLE . '
|
||||||
$db->sql_query($sql);
|
WHERE log_type = ' . LOG_USERS . "
|
||||||
|
AND reportee_id = $user_id
|
||||||
|
$where_sql";
|
||||||
|
$db->sql_query($sql);
|
||||||
|
|
||||||
add_log('admin', 'LOG_CLEAR_USER', $userrow['username']);
|
add_log('admin', 'LOG_CLEAR_USER', $userrow['username']);
|
||||||
|
|
||||||
$msg = ($deletemark) ? 'MARKED_DELETED' : 'ALL_DELETED';
|
$msg = ($deletemark) ? 'MARKED_DELETED' : 'ALL_DELETED';
|
||||||
$redirect = "mcp.$phpEx$SID&i=$id&mode=$mode&u=$user_id";
|
$redirect = "mcp.$phpEx$SID&i=$id&mode=$mode&u=$user_id";
|
||||||
meta_refresh(2, $redirect);
|
meta_refresh(2, $redirect);
|
||||||
trigger_error($user->lang[$msg] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>'));
|
trigger_error($user->lang[$msg] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($usernote && $action == 'add_feedback')
|
if ($usernote && $action == 'add_feedback')
|
||||||
|
|
Loading…
Add table
Reference in a new issue