Zeile 358 | Zeile 358 |
---|
$cache->update_groupleaders();
// Log admin action
|
$cache->update_groupleaders();
// Log admin action
|
log_admin_action($user['uid'], $mybb->input['username'], $group['gid'], htmlspecialchars_uni($group['title']));
| log_admin_action($user['uid'], $user['username'], $group['gid'], htmlspecialchars_uni($group['title']));
|
flash_message("{$user['username']} ".$lang->success_user_made_leader, 'success'); admin_redirect("index.php?module=user-groups&action=leaders&gid={$group['gid']}");
| flash_message("{$user['username']} ".$lang->success_user_made_leader, 'success'); admin_redirect("index.php?module=user-groups&action=leaders&gid={$group['gid']}");
|
Zeile 478 | Zeile 478 |
---|
$form_container->output_row($lang->can_manage_group_members, $lang->can_manage_group_members_desc, $form->generate_yes_no_radio('canmanagemembers', $mybb->input['canmanagemembers'])); $form_container->output_row($lang->can_manage_group_join_requests, $lang->can_manage_group_join_requests_desc, $form->generate_yes_no_radio('canmanagerequests', $mybb->input['canmanagerequests'])); $form_container->output_row($lang->can_invite_group_members, $lang->can_invite_group_members_desc, $form->generate_yes_no_radio('caninvitemembers', $mybb->input['caninvitemembers']));
|
$form_container->output_row($lang->can_manage_group_members, $lang->can_manage_group_members_desc, $form->generate_yes_no_radio('canmanagemembers', $mybb->input['canmanagemembers'])); $form_container->output_row($lang->can_manage_group_join_requests, $lang->can_manage_group_join_requests_desc, $form->generate_yes_no_radio('canmanagerequests', $mybb->input['canmanagerequests'])); $form_container->output_row($lang->can_invite_group_members, $lang->can_invite_group_members_desc, $form->generate_yes_no_radio('caninvitemembers', $mybb->input['caninvitemembers']));
|
$buttons[] = $form->generate_submit_button($lang->save_group_leader);
| |
$form_container->end();
|
$form_container->end();
|
| // Autocompletion for usernames echo ' <link rel="stylesheet" href="../jscripts/select2/select2.css"> <script type="text/javascript" src="../jscripts/select2/select2.min.js?ver=1804"></script> <script type="text/javascript"> <!-- $("#username").select2({ placeholder: "'.$lang->search_for_a_user.'", minimumInputLength: 3, maximumSelectionSize: 3, multiple: false, ajax: { // instead of writing the function to execute the request we use Select2\'s convenient helper url: "../xmlhttp.php?action=get_users", dataType: \'json\', data: function (term, page) { return { query: term // search term }; }, results: function (data, page) { // parse the results into the format expected by Select2. // since we are using custom formatting functions we do not need to alter remote JSON data return {results: data}; } }, initSelection: function(element, callback) { var query = $(element).val(); if (query !== "") { $.ajax("../xmlhttp.php?action=get_users&getone=1", { data: { query: query }, dataType: "json" }).done(function(data) { callback(data); }); } } }); // --> </script>';
$buttons[] = $form->generate_submit_button($lang->save_group_leader);
|
$form->output_submit_wrapper($buttons); $form->end();
| $form->output_submit_wrapper($buttons); $form->end();
|
Zeile 525 | Zeile 564 |
---|
$cache->update_groupleaders();
// Log admin action
|
$cache->update_groupleaders();
// Log admin action
|
log_admin_action($leader['lid'], $leader['username'], $group['gid'], htmlspecialchars_uni($group['title']));
| log_admin_action($leader['uid'], $leader['username'], $group['gid'], htmlspecialchars_uni($group['title']));
|
flash_message($lang->success_group_leader_deleted, 'success'); admin_redirect("index.php?module=user-groups&action=leaders&gid={$group['gid']}");
| flash_message($lang->success_group_leader_deleted, 'success'); admin_redirect("index.php?module=user-groups&action=leaders&gid={$group['gid']}");
|
Zeile 572 | Zeile 611 |
---|
$cache->update_groupleaders();
// Log admin action
|
$cache->update_groupleaders();
// Log admin action
|
log_admin_action($leader['lid'], $leader['username'], $group['gid'], htmlspecialchars_uni($group['title']));
| log_admin_action($leader['uid'], $leader['username'], $group['gid'], htmlspecialchars_uni($group['title']));
|
flash_message($lang->success_group_leader_updated, 'success'); admin_redirect("index.php?module=user-groups&action=leaders&gid={$group['gid']}");
| flash_message($lang->success_group_leader_updated, 'success'); admin_redirect("index.php?module=user-groups&action=leaders&gid={$group['gid']}");
|
Zeile 666 | Zeile 705 |
---|
foreach(array_keys($usergroup_permissions) as $field) { $new_usergroup[$field] = $existing_usergroup[$field];
|
foreach(array_keys($usergroup_permissions) as $field) { $new_usergroup[$field] = $existing_usergroup[$field];
|
} }
$plugins->run_hooks("admin_user_groups_add_commit");
| } }
$plugins->run_hooks("admin_user_groups_add_commit");
|
$gid = $db->insert_query("usergroups", $new_usergroup);
| $gid = $db->insert_query("usergroups", $new_usergroup);
|
Zeile 954 | Zeile 993 |
---|
elseif($usergroup['type'] == "5") { $usergroup['joinable'] = 1;
|
elseif($usergroup['type'] == "5") { $usergroup['joinable'] = 1;
|
$usergroup['moderate'] = 0;
| $usergroup['moderate'] = 0;
|
$usergroup['invite'] = 1; } else
| $usergroup['invite'] = 1; } else
|
Zeile 1144 | Zeile 1183 |
---|
$form->generate_check_box("canviewonline", 1, $lang->can_view_whos_online, array("checked" => $mybb->input['canviewonline'])), $form->generate_check_box("canviewwolinvis", 1, $lang->can_view_invisible, array("checked" => $mybb->input['canviewwolinvis'])), $form->generate_check_box("canviewonlineips", 1, $lang->can_view_ips, array("checked" => $mybb->input['canviewonlineips']))
|
$form->generate_check_box("canviewonline", 1, $lang->can_view_whos_online, array("checked" => $mybb->input['canviewonline'])), $form->generate_check_box("canviewwolinvis", 1, $lang->can_view_invisible, array("checked" => $mybb->input['canviewwolinvis'])), $form->generate_check_box("canviewonlineips", 1, $lang->can_view_ips, array("checked" => $mybb->input['canviewonlineips']))
|
);
| );
|
$form_container->output_row($lang->whos_online, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $wol_options)."</div>");
$misc_options = array(
| $form_container->output_row($lang->whos_online, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $wol_options)."</div>");
$misc_options = array(
|
Zeile 1156 | Zeile 1195 |
---|
"{$lang->email_flood_time}<br /><small class=\"input\">{$lang->email_flood_time_desc}</small><br />".$form->generate_numeric_field('emailfloodtime', $mybb->input['emailfloodtime'], array('id' => 'emailfloodtime', 'class' => 'field50', 'min' => 0)) ); $form_container->output_row($lang->misc, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $misc_options)."</div>");
|
"{$lang->email_flood_time}<br /><small class=\"input\">{$lang->email_flood_time_desc}</small><br />".$form->generate_numeric_field('emailfloodtime', $mybb->input['emailfloodtime'], array('id' => 'emailfloodtime', 'class' => 'field50', 'min' => 0)) ); $form_container->output_row($lang->misc, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $misc_options)."</div>");
|
|
|
$form_container->end(); echo "</div>";
| $form_container->end(); echo "</div>";
|
Zeile 1220 | Zeile 1259 |
---|
if($mybb->request_method == "post") {
|
if($mybb->request_method == "post") {
|
// Move any users back to the registered group $updated_users = array("usergroup" => 2); $db->update_query("users", $updated_users, "usergroup='{$usergroup['gid']}'");
| if($usergroup['isbannedgroup'] == 1) { // If banned group, move users to default banned group $updated_users = array("usergroup" => 7); } else { // Move any users back to the registered group $updated_users = array("usergroup" => 2); }
$db->update_query("users", $updated_users, "usergroup='{$usergroup['gid']}'");
|
$updated_users = array("displaygroup" => "usergroup"); $plugins->run_hooks("admin_user_groups_delete_commit");
|
$updated_users = array("displaygroup" => "usergroup"); $plugins->run_hooks("admin_user_groups_delete_commit");
|
|
|
$db->update_query("users", $updated_users, "displaygroup='{$usergroup['gid']}'", "", true); // No quotes = displaygroup=usergroup
switch($db->type)
|
$db->update_query("users", $updated_users, "displaygroup='{$usergroup['gid']}'", "", true); // No quotes = displaygroup=usergroup
switch($db->type)
|
{
| {
|
case "pgsql": case "sqlite": $query = $db->simple_select("users", "uid", "','||additionalgroups||',' LIKE '%,{$usergroup['gid']},%'"); break; default: $query = $db->simple_select("users", "uid", "CONCAT(',',additionalgroups,',') LIKE '%,{$usergroup['gid']},%'");
|
case "pgsql": case "sqlite": $query = $db->simple_select("users", "uid", "','||additionalgroups||',' LIKE '%,{$usergroup['gid']},%'"); break; default: $query = $db->simple_select("users", "uid", "CONCAT(',',additionalgroups,',') LIKE '%,{$usergroup['gid']},%'");
|
}
| }
|
while($user = $db->fetch_array($query)) { leave_usergroup($user['uid'], $usergroup['gid']); }
|
while($user = $db->fetch_array($query)) { leave_usergroup($user['uid'], $usergroup['gid']); }
|
| $db->update_query("banned", array("gid" => 7), "gid='{$usergroup['gid']}'"); $db->update_query("banned", array("oldgroup" => 2), "oldgroup='{$usergroup['gid']}'"); $db->update_query("banned", array("olddisplaygroup" => "oldgroup"), "olddisplaygroup='{$usergroup['gid']}'", "", true); // No quotes = displaygroup=usergroup
$db->delete_query("forumpermissions", "gid='{$usergroup['gid']}'"); $db->delete_query("calendarpermissions", "gid='{$usergroup['gid']}'"); $db->delete_query("joinrequests", "gid='{$usergroup['gid']}'"); $db->delete_query("moderators", "id='{$usergroup['gid']}' AND isgroup='1'");
|
$db->delete_query("groupleaders", "gid='{$usergroup['gid']}'"); $db->delete_query("usergroups", "gid='{$usergroup['gid']}'");
| $db->delete_query("groupleaders", "gid='{$usergroup['gid']}'"); $db->delete_query("usergroups", "gid='{$usergroup['gid']}'");
|
Zeile 1252 | Zeile 1308 |
---|
$cache->update_moderators(); $cache->update_usergroups(); $cache->update_forumpermissions();
|
$cache->update_moderators(); $cache->update_usergroups(); $cache->update_forumpermissions();
|
| $cache->update_banned();
|
// Log admin action log_admin_action($usergroup['gid'], htmlspecialchars_uni($usergroup['title']));
| // Log admin action log_admin_action($usergroup['gid'], htmlspecialchars_uni($usergroup['title']));
|
Zeile 1400 | Zeile 1457 |
---|
$leaders_list = ''; if(isset($leaders[$usergroup['gid']])) {
|
$leaders_list = ''; if(isset($leaders[$usergroup['gid']])) {
|
$leaders_list = "<br />{$lang->group_leaders}: ".implode(", ", $leaders[$usergroup['gid']]);
| $leaders_list = "<br />{$lang->group_leaders}: ".implode($lang->comma, $leaders[$usergroup['gid']]);
|
}
$join_requests = '';
| }
$join_requests = '';
|