Zeile 142 | Zeile 142 |
---|
{ $updated_group = array( 'usergroup' => $ban['oldgroup'],
|
{ $updated_group = array( 'usergroup' => $ban['oldgroup'],
|
'additionalgroups' => $ban['oldadditionalgroups'],
| 'additionalgroups' => $db->escape_string($ban['oldadditionalgroups']),
|
'displaygroup' => $ban['olddisplaygroup'] ); $db->delete_query("banned", "uid='{$ban['uid']}'");
| 'displaygroup' => $ban['olddisplaygroup'] ); $db->delete_query("banned", "uid='{$ban['uid']}'");
|
Zeile 151 | Zeile 151 |
---|
$db->update_query("users", $updated_group, "uid='{$ban['uid']}'");
|
$db->update_query("users", $updated_group, "uid='{$ban['uid']}'");
|
$cache->update_banned();
| |
$cache->update_moderators();
// Log admin action
| $cache->update_moderators();
// Log admin action
|
Zeile 238 | Zeile 237 |
---|
$db->update_query('users', $update_array, "uid = {$ban['uid']}");
$plugins->run_hooks("admin_user_banning_edit_commit");
|
$db->update_query('users', $update_array, "uid = {$ban['uid']}");
$plugins->run_hooks("admin_user_banning_edit_commit");
|
$cache->update_banned();
| |
// Log admin action log_admin_action($ban['uid'], $user['username']);
| // Log admin action log_admin_action($ban['uid'], $user['username']);
|
Zeile 260 | Zeile 257 |
---|
$form = new Form("index.php?module=user-banning&action=edit&uid={$ban['uid']}", "post"); if($errors)
|
$form = new Form("index.php?module=user-banning&action=edit&uid={$ban['uid']}", "post"); if($errors)
|
{
| {
|
$page->output_inline_error($errors);
|
$page->output_inline_error($errors);
|
}
| }
|
else
|
else
|
{
| {
|
$mybb->input = array_merge($mybb->input, $ban);
|
$mybb->input = array_merge($mybb->input, $ban);
|
}
| }
|
$form_container = new FormContainer($lang->edit_ban); $form_container->output_row($lang->ban_username, "", htmlspecialchars_uni($user['username'])); $form_container->output_row($lang->ban_reason, "", $form->generate_text_area('reason', $mybb->input['reason'], array('id' => 'reason', 'maxlength' => '255')), 'reason'); if(count($banned_groups) > 1)
|
$form_container = new FormContainer($lang->edit_ban); $form_container->output_row($lang->ban_username, "", htmlspecialchars_uni($user['username'])); $form_container->output_row($lang->ban_reason, "", $form->generate_text_area('reason', $mybb->input['reason'], array('id' => 'reason', 'maxlength' => '255')), 'reason'); if(count($banned_groups) > 1)
|
{
| {
|
$form_container->output_row($lang->ban_group, $lang->ban_group_desc, $form->generate_select_box('usergroup', $banned_groups, $mybb->input['usergroup'], array('id' => 'usergroup')), 'usergroup');
|
$form_container->output_row($lang->ban_group, $lang->ban_group_desc, $form->generate_select_box('usergroup', $banned_groups, $mybb->input['usergroup'], array('id' => 'usergroup')), 'usergroup');
|
}
| }
|
if($mybb->input['bantime'] == 'perm' || $mybb->input['bantime'] == '' || $mybb->input['lifted'] == 'perm' ||$mybb->input['lifted'] == '') { $mybb->input['bantime'] = '---'; $mybb->input['lifted'] = '---';
|
if($mybb->input['bantime'] == 'perm' || $mybb->input['bantime'] == '' || $mybb->input['lifted'] == 'perm' ||$mybb->input['lifted'] == '') { $mybb->input['bantime'] = '---'; $mybb->input['lifted'] = '---';
|
}
| }
|
foreach($ban_times as $time => $period) {
| foreach($ban_times as $time => $period) {
|
Zeile 337 | Zeile 334 |
---|
{ $query = $db->simple_select("banned", "uid", "uid='{$user['uid']}'"); if($db->fetch_field($query, "uid"))
|
{ $query = $db->simple_select("banned", "uid", "uid='{$user['uid']}'"); if($db->fetch_field($query, "uid"))
|
{ $errors[] = $lang->error_already_banned; }
| { $errors[] = $lang->error_already_banned; }
|
// Get PRIMARY usergroup information $usergroups = $cache->read("usergroups"); if(!empty($usergroups[$user['usergroup']]) && $usergroups[$user['usergroup']]['isbannedgroup'] == 1)
| // Get PRIMARY usergroup information $usergroups = $cache->read("usergroups"); if(!empty($usergroups[$user['usergroup']]) && $usergroups[$user['usergroup']]['isbannedgroup'] == 1)
|
Zeile 379 | Zeile 376 |
---|
'uid' => $user['uid'], 'gid' => $mybb->get_input('usergroup', MyBB::INPUT_INT), 'oldgroup' => $user['usergroup'],
|
'uid' => $user['uid'], 'gid' => $mybb->get_input('usergroup', MyBB::INPUT_INT), 'oldgroup' => $user['usergroup'],
|
'oldadditionalgroups' => $user['additionalgroups'],
| 'oldadditionalgroups' => $db->escape_string($user['additionalgroups']),
|
'olddisplaygroup' => $user['displaygroup'], 'admin' => (int)$mybb->user['uid'], 'dateline' => TIME_NOW,
| 'olddisplaygroup' => $user['displaygroup'], 'admin' => (int)$mybb->user['uid'], 'dateline' => TIME_NOW,
|
Zeile 402 | Zeile 399 |
---|
$plugins->run_hooks("admin_user_banning_start_commit");
$db->update_query('users', $update_array, "uid = '{$user['uid']}'");
|
$plugins->run_hooks("admin_user_banning_start_commit");
$db->update_query('users', $update_array, "uid = '{$user['uid']}'");
|
$cache->update_banned();
| |
// Log admin action log_admin_action($user['uid'], $user['username'], $lifted);
| // Log admin action log_admin_action($user['uid'], $user['username'], $lifted);
|