Zeile 93 | Zeile 93 |
---|
{ $moderation->delete_post($post['pid']); }
|
{ $moderation->delete_post($post['pid']); }
|
$cache->update_reportedcontent();
$plugins->run_hooks("admin_user_banning_prune_commit");
| $plugins->run_hooks("admin_user_banning_prune_commit");
$cache->update_reportedcontent();
|
// Log admin action log_admin_action($mybb->input['uid'], $user['username']);
flash_message($lang->success_pruned, 'success');
|
// Log admin action log_admin_action($mybb->input['uid'], $user['username']);
flash_message($lang->success_pruned, 'success');
|
admin_redirect("index.php?module=user-banning");
| admin_redirect("index.php?module=user-banning");
|
} else {
| } else {
|
Zeile 113 | Zeile 114 |
---|
{ // User clicked no if($mybb->input['no'])
|
{ // User clicked no if($mybb->input['no'])
|
{ admin_redirect("index.php?module=user-banning"); }
| { admin_redirect("index.php?module=user-banning"); }
|
$query = $db->simple_select("banned", "*", "uid='{$mybb->input['uid']}'"); $ban = $db->fetch_array($query);
|
$query = $db->simple_select("banned", "*", "uid='{$mybb->input['uid']}'"); $ban = $db->fetch_array($query);
|
|
|
if(!$ban['uid']) { flash_message($lang->error_invalid_ban, 'error');
| if(!$ban['uid']) { flash_message($lang->error_invalid_ban, 'error');
|
Zeile 129 | Zeile 130 |
---|
$user = get_user($ban['uid']);
if(is_super_admin($user['uid']) && ($mybb->user['uid'] != $user['uid'] && !is_super_admin($mybb->user['uid'])))
|
$user = get_user($ban['uid']);
if(is_super_admin($user['uid']) && ($mybb->user['uid'] != $user['uid'] && !is_super_admin($mybb->user['uid'])))
|
{ flash_message($lang->cannot_perform_action_super_admin_general, 'error'); admin_redirect("index.php?module=user-banning");
| { flash_message($lang->cannot_perform_action_super_admin_general, 'error'); admin_redirect("index.php?module=user-banning");
|
}
$plugins->run_hooks("admin_user_banning_lift");
| }
$plugins->run_hooks("admin_user_banning_lift");
|
Zeile 143 | Zeile 144 |
---|
'additionalgroups' => $ban['oldadditionalgroups'], 'displaygroup' => $ban['olddisplaygroup'] );
|
'additionalgroups' => $ban['oldadditionalgroups'], 'displaygroup' => $ban['olddisplaygroup'] );
|
$db->update_query("users", $updated_group, "uid='{$ban['uid']}'");
| |
$db->delete_query("banned", "uid='{$ban['uid']}'");
|
$db->delete_query("banned", "uid='{$ban['uid']}'");
|
| $plugins->run_hooks("admin_user_banning_lift_commit");
$db->update_query("users", $updated_group, "uid='{$ban['uid']}'");
|
$cache->update_banned(); $cache->update_moderators();
|
$cache->update_banned(); $cache->update_moderators();
|
$plugins->run_hooks("admin_user_banning_lift_commit");
|
|
// Log admin action log_admin_action($mybb->input['uid'], $user['username']);
| // Log admin action log_admin_action($mybb->input['uid'], $user['username']);
|
Zeile 167 | Zeile 169 |
---|
{ $query = $db->simple_select("banned", "*", "uid='{$mybb->input['uid']}'"); $ban = $db->fetch_array($query);
|
{ $query = $db->simple_select("banned", "*", "uid='{$mybb->input['uid']}'"); $ban = $db->fetch_array($query);
|
$user = get_user($ban['uid']);
| $user = get_user($ban['uid']);
|
if(!$ban['uid']) { flash_message($lang->error_invalid_ban, 'error');
| if(!$ban['uid']) { flash_message($lang->error_invalid_ban, 'error');
|
Zeile 188 | Zeile 190 |
---|
else if(is_super_admin($ban['uid']) && !is_super_admin($ban['uid'])) { $errors[] = $lang->error_no_perm_to_ban;
|
else if(is_super_admin($ban['uid']) && !is_super_admin($ban['uid'])) { $errors[] = $lang->error_no_perm_to_ban;
|
}
| }
|
if($ban['uid'] == $mybb->user['uid']) { $errors[] = $lang->error_ban_self;
| if($ban['uid'] == $mybb->user['uid']) { $errors[] = $lang->error_ban_self;
|
Zeile 206 | Zeile 208 |
---|
else { $lifted = ban_date2timestamp($mybb->input['bantime'], $ban['dateline']);
|
else { $lifted = ban_date2timestamp($mybb->input['bantime'], $ban['dateline']);
|
}
$reason = my_substr($mybb->input['reason'], 0, 255);
| }
$reason = my_substr($mybb->input['reason'], 0, 255);
|
if(count($banned_groups) == 1) { $group = array_keys($banned_groups); $mybb->input['usergroup'] = $group[0]; }
|
if(count($banned_groups) == 1) { $group = array_keys($banned_groups); $mybb->input['usergroup'] = $group[0]; }
|
|
|
$update_array = array( 'gid' => (int)$mybb->input['usergroup'], 'dateline' => TIME_NOW, 'bantime' => $db->escape_string($mybb->input['bantime']), 'lifted' => $db->escape_string($lifted), 'reason' => $db->escape_string($reason)
|
$update_array = array( 'gid' => (int)$mybb->input['usergroup'], 'dateline' => TIME_NOW, 'bantime' => $db->escape_string($mybb->input['bantime']), 'lifted' => $db->escape_string($lifted), 'reason' => $db->escape_string($reason)
|
);
| );
|
$db->update_query('banned', $update_array, "uid='{$ban['uid']}'");
| $db->update_query('banned', $update_array, "uid='{$ban['uid']}'");
|
Zeile 233 | Zeile 235 |
---|
'additionalgroups' => '', ); $db->update_query('users', $update_array, "uid = {$ban['uid']}");
|
'additionalgroups' => '', ); $db->update_query('users', $update_array, "uid = {$ban['uid']}");
|
$cache->update_banned();
|
|
$plugins->run_hooks("admin_user_banning_edit_commit");
|
$plugins->run_hooks("admin_user_banning_edit_commit");
|
| $cache->update_banned();
|
// Log admin action log_admin_action($mybb->input['uid'], $user['username']);
| // Log admin action log_admin_action($mybb->input['uid'], $user['username']);
|
Zeile 392 | Zeile 394 |
---|
'displaygroup' => 0, 'additionalgroups' => '', );
|
'displaygroup' => 0, 'additionalgroups' => '', );
|
$db->update_query('users', $update_array, "uid = '{$user['uid']}'");
|
|
$db->delete_query("forumsubscriptions", "uid = '{$user['uid']}'"); $db->delete_query("threadsubscriptions", "uid = '{$user['uid']}'");
|
$db->delete_query("forumsubscriptions", "uid = '{$user['uid']}'"); $db->delete_query("threadsubscriptions", "uid = '{$user['uid']}'");
|
| $plugins->run_hooks("admin_user_banning_start_commit");
$db->update_query('users', $update_array, "uid = '{$user['uid']}'");
|
$cache->update_banned();
|
$cache->update_banned();
|
$plugins->run_hooks("admin_user_banning_start_commit");
| |
// Log admin action log_admin_action($user['uid'], $user['username'], $lifted);
| // Log admin action log_admin_action($user['uid'], $user['username'], $lifted);
|