Vergleich admin/modules/user/groups.php - 1.8.4 - 1.8.12

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 28Zeile 28
	"candeleteposts" => 1,
"candeletethreads" => 1,
"caneditattachments" => 1,

	"candeleteposts" => 1,
"candeletethreads" => 1,
"caneditattachments" => 1,

 
	"canviewdeletionnotice" => 1,

	"canpostpolls" => 1,
"canvotepolls" => 1,
"canundovotes" => 0,

	"canpostpolls" => 1,
"canvotepolls" => 1,
"canundovotes" => 0,

Zeile 64Zeile 65
	"candeletereputations" => 1,
"reputationpower" => 1,
"maxreputationsday" => 5,

	"candeletereputations" => 1,
"reputationpower" => 1,
"maxreputationsday" => 5,

	"maxreputationsperuser" => 5,
"maxreputationsperthread" => 5,

	"maxreputationsperuser" => 0,
"maxreputationsperthread" => 0,

	"candisplaygroup" => 0,
"attachquota" => 5000,
"cancustomtitle" => 0,

	"candisplaygroup" => 0,
"attachquota" => 5000,
"cancustomtitle" => 0,

Zeile 283Zeile 284
	while($request = $db->fetch_array($query))
{
$table->construct_cell($form->generate_check_box("users[]", $request['uid'], ""));

	while($request = $db->fetch_array($query))
{
$table->construct_cell($form->generate_check_box("users[]", $request['uid'], ""));

		$table->construct_cell("<strong>".build_profile_link($request['username'], $request['uid'], "_blank")."</strong>");

		$table->construct_cell("<strong>".build_profile_link(htmlspecialchars_uni($request['username']), $request['uid'], "_blank")."</strong>");

		$table->construct_cell(htmlspecialchars_uni($request['reason']));
$table->construct_cell(my_date('relative', $request['dateline']), array('class' => 'align_center'));


		$table->construct_cell(htmlspecialchars_uni($request['reason']));
$table->construct_cell(my_date('relative', $request['dateline']), array('class' => 'align_center'));


Zeile 351Zeile 352
			"caninvitemembers" => $mybb->get_input('caninvitemembers', MyBB::INPUT_INT)
);


			"caninvitemembers" => $mybb->get_input('caninvitemembers', MyBB::INPUT_INT)
);


		$plugins->run_hooks("admin_user_groups_add_leader_commit");







		$makeleadermember = $mybb->get_input('makeleadermember', MyBB::INPUT_INT);
if($makeleadermember == 1)
{
join_usergroup($user['uid'], $group['gid']);
}

$plugins->run_hooks("admin_user_groups_add_leader_commit");


$db->insert_query("groupleaders", $new_leader);


$db->insert_query("groupleaders", $new_leader);





		$cache->update_groupleaders();

		$cache->update_groupleaders();





		// Log admin action

		// Log admin action

		log_admin_action($user['uid'], $mybb->input['username'], $group['gid'], htmlspecialchars_uni($group['title']));

		log_admin_action($user['uid'], htmlspecialchars_uni($user['username']), $group['gid'], htmlspecialchars_uni($group['title']));





		flash_message("{$user['username']} ".$lang->success_user_made_leader, 'success');


		$username = htmlspecialchars_uni($user['username']);
flash_message("{$username} ".$lang->success_user_made_leader, 'success');

		admin_redirect("index.php?module=user-groups&action=leaders&gid={$group['gid']}");

		admin_redirect("index.php?module=user-groups&action=leaders&gid={$group['gid']}");

	}
else

	}
else

	{
// Errors, show leaders page
$mybb->input['action'] = "leaders";

	{
// Errors, show leaders page
$mybb->input['action'] = "leaders";

Zeile 416Zeile 424
		if($leader['canmanagemembers'])
{
$canmanagemembers = $lang->yes;

		if($leader['canmanagemembers'])
{
$canmanagemembers = $lang->yes;

		}
else

		}
else

		{
$canmanagemembers = $lang->no;

		{
$canmanagemembers = $lang->no;

		}

		}


if($leader['canmanagerequests'])
{
$canmanagerequests = $lang->yes;


if($leader['canmanagerequests'])
{
$canmanagerequests = $lang->yes;

		}

		}

		else
{
$canmanagerequests = $lang->no;

		else
{
$canmanagerequests = $lang->no;

		}


		}


		if($leader['caninvitemembers'])
{
$caninvitemembers = $lang->yes;

		if($leader['caninvitemembers'])
{
$caninvitemembers = $lang->yes;

Zeile 458Zeile 466
	$table->output($lang->group_leaders_for.' '.htmlspecialchars_uni($group['title']));

$form = new Form("index.php?module=user-groups&amp;action=add_leader&amp;gid={$group['gid']}", "post");

	$table->output($lang->group_leaders_for.' '.htmlspecialchars_uni($group['title']));

$form = new Form("index.php?module=user-groups&amp;action=add_leader&amp;gid={$group['gid']}", "post");


if($errors)
{
$page->output_inline_error($errors);
}
else


if($errors)
{
$page->output_inline_error($errors);
}
else

	{
$mybb->input = array_merge($mybb->input, array(
"canmanagemembers" => 1,
"canmanagerequests" => 1,

	{
$mybb->input = array_merge($mybb->input, array(
"canmanagemembers" => 1,
"canmanagerequests" => 1,

				"caninvitemembers" => 1


				"caninvitemembers" => 1,
"makeleadermember" => 0

			)
);
}

$form_container = new FormContainer($lang->add_group_leader.' '.htmlspecialchars_uni($group['title']));

			)
);
}

$form_container = new FormContainer($lang->add_group_leader.' '.htmlspecialchars_uni($group['title']));

	$form_container->output_row($lang->username." <em>*</em>", "", $form->generate_text_box('username', $mybb->input['username'], array('id' => 'username')), 'username');

	$form_container->output_row($lang->username." <em>*</em>", "", $form->generate_text_box('username', htmlspecialchars_uni($mybb->get_input('username')), array('id' => 'username')), 'username');

	$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->output_row($lang->make_user_member, $lang->make_user_member_desc, $form->generate_yes_no_radio('makeleadermember', $mybb->input['makeleadermember']));


	$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: 2,
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 507Zeile 555

// User clicked no
if($mybb->input['no'])


// User clicked no
if($mybb->input['no'])

	{

	{

		admin_redirect("index.php?module=user-groups");
}


		admin_redirect("index.php?module=user-groups");
}


Zeile 525Zeile 573
		$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'], htmlspecialchars_uni($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 534Zeile 582
	{
$page->output_confirm_action("index.php?module=user-groups&amp;action=delete_leader&amp;lid={$leader['lid']}", $lang->confirm_group_leader_deletion);
}

	{
$page->output_confirm_action("index.php?module=user-groups&amp;action=delete_leader&amp;lid={$leader['lid']}", $lang->confirm_group_leader_deletion);
}

}


}


if($mybb->input['action'] == "edit_leader")
{
$query = $db->query("

if($mybb->input['action'] == "edit_leader")
{
$query = $db->query("

Zeile 572Zeile 620
		$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'], htmlspecialchars_uni($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']}");

	}


	}


	if(!$errors)
{
$mybb->input = array_merge($mybb->input, $leader);
}

$page->add_breadcrumb_item($lang->group_leaders_for.' '.htmlspecialchars_uni($group['title']), "index.php?module=user-groups&action=leaders&gid={$group['gid']}");

	if(!$errors)
{
$mybb->input = array_merge($mybb->input, $leader);
}

$page->add_breadcrumb_item($lang->group_leaders_for.' '.htmlspecialchars_uni($group['title']), "index.php?module=user-groups&action=leaders&gid={$group['gid']}");

 
	$leader['username'] = htmlspecialchars_uni($leader['username']);

	$page->add_breadcrumb_item($lang->edit_leader." {$leader['username']}");

$page->output_header($lang->edit_group_leader);

	$page->add_breadcrumb_item($lang->edit_leader." {$leader['username']}");

$page->output_header($lang->edit_group_leader);

Zeile 629Zeile 678
		{
$errors[] = $lang->error_missing_namestyle_username;
}

		{
$errors[] = $lang->error_missing_namestyle_username;
}





		if(!$errors)
{
if($mybb->input['stars'] < 1)

		if(!$errors)
{
if($mybb->input['stars'] < 1)

Zeile 666Zeile 715
				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");

$gid = $db->insert_query("usergroups", $new_usergroup);

				}
}

$plugins->run_hooks("admin_user_groups_add_commit");

$gid = $db->insert_query("usergroups", $new_usergroup);


$plugins->run_hooks("admin_user_groups_add_commit_end");


$plugins->run_hooks("admin_user_groups_add_commit_end");





			// Are we copying permissions? If so, copy all forum permissions too
if($mybb->input['copyfrom'] > 0)
{

			// Are we copying permissions? If so, copy all forum permissions too
if($mybb->input['copyfrom'] > 0)
{

Zeile 684Zeile 733
					unset($forum_permission['pid']);
$forum_permission['gid'] = $gid;
$db->insert_query("forumpermissions", $forum_permission);

					unset($forum_permission['pid']);
$forum_permission['gid'] = $gid;
$db->insert_query("forumpermissions", $forum_permission);

				}
}

// Update the caches
$cache->update_usergroups();

				}
}

// Update the caches
$cache->update_usergroups();

			$cache->update_forumpermissions();

// Log admin action

			$cache->update_forumpermissions();

// Log admin action

Zeile 715Zeile 764
				"namestyle" => "{username}"
)
);

				"namestyle" => "{username}"
)
);

	}


	}


	$form_container = new FormContainer($lang->add_user_group);
$form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('title', $mybb->input['title'], array('id' => 'title')), 'title');
$form_container->output_row($lang->short_description, "", $form->generate_text_box('description', $mybb->input['description'], array('id' => 'description')), 'description');

	$form_container = new FormContainer($lang->add_user_group);
$form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('title', $mybb->input['title'], array('id' => 'title')), 'title');
$form_container->output_row($lang->short_description, "", $form->generate_text_box('description', $mybb->input['description'], array('id' => 'description')), 'description');

Zeile 730Zeile 779
		$options[$usergroup['gid']] = htmlspecialchars_uni($usergroup['title']);
}
$form_container->output_row($lang->copy_permissions_from, $lang->copy_permissions_from_desc, $form->generate_select_box('copyfrom', $options, $mybb->input['copyfrom'], array('id' => 'copyfrom')), 'copyfrom');

		$options[$usergroup['gid']] = htmlspecialchars_uni($usergroup['title']);
}
$form_container->output_row($lang->copy_permissions_from, $lang->copy_permissions_from_desc, $form->generate_select_box('copyfrom', $options, $mybb->input['copyfrom'], array('id' => 'copyfrom')), 'copyfrom');





	$form_container->end();
$buttons[] = $form->generate_submit_button($lang->save_user_group);
$form->output_submit_wrapper($buttons);

	$form_container->end();
$buttons[] = $form->generate_submit_button($lang->save_user_group);
$form->output_submit_wrapper($buttons);





	$form->end();
$page->output_footer();
}

	$form->end();
$page->output_footer();
}

Zeile 743Zeile 792
{
$query = $db->simple_select("usergroups", "*", "gid='".$mybb->get_input('gid', MyBB::INPUT_INT)."'");
$usergroup = $db->fetch_array($query);

{
$query = $db->simple_select("usergroups", "*", "gid='".$mybb->get_input('gid', MyBB::INPUT_INT)."'");
$usergroup = $db->fetch_array($query);





	if(!$usergroup['gid'])

	if(!$usergroup['gid'])

	{

	{

		flash_message($lang->error_invalid_user_group, 'error');
admin_redirect("index.php?module=user-group");
}

		flash_message($lang->error_invalid_user_group, 'error');
admin_redirect("index.php?module=user-group");
}

Zeile 757Zeile 806
			$mybb->input['namestyle'] = $usergroup['namestyle'];
}
}

			$mybb->input['namestyle'] = $usergroup['namestyle'];
}
}





	$plugins->run_hooks("admin_user_groups_edit");

if($mybb->request_method == "post")
{
if(!trim($mybb->input['title']))

	$plugins->run_hooks("admin_user_groups_edit");

if($mybb->request_method == "post")
{
if(!trim($mybb->input['title']))

		{

		{

			$errors[] = $lang->error_missing_title;

			$errors[] = $lang->error_missing_title;

		}


		}


		if(my_strpos($mybb->input['namestyle'], "{username}") === false)
{
$errors[] = $lang->error_missing_namestyle_username;

		if(my_strpos($mybb->input['namestyle'], "{username}") === false)
{
$errors[] = $lang->error_missing_namestyle_username;

		}


		}


		if($mybb->input['moderate'] == 1 && $mybb->input['invite'] == 1)
{
$errors[] = $lang->error_cannot_have_both_types;

		if($mybb->input['moderate'] == 1 && $mybb->input['invite'] == 1)
{
$errors[] = $lang->error_cannot_have_both_types;

Zeile 797Zeile 846
			else
{
$mybb->input['type'] = "2";

			else
{
$mybb->input['type'] = "2";

			}


			}


			if($usergroup['type'] == 1)
{
$mybb->input['type'] = 1;

			if($usergroup['type'] == 1)
{
$mybb->input['type'] = 1;

Zeile 836Zeile 885
				"candeleteposts" => $mybb->get_input('candeleteposts', MyBB::INPUT_INT),
"candeletethreads" => $mybb->get_input('candeletethreads', MyBB::INPUT_INT),
"caneditattachments" => $mybb->get_input('caneditattachments', MyBB::INPUT_INT),

				"candeleteposts" => $mybb->get_input('candeleteposts', MyBB::INPUT_INT),
"candeletethreads" => $mybb->get_input('candeletethreads', MyBB::INPUT_INT),
"caneditattachments" => $mybb->get_input('caneditattachments', MyBB::INPUT_INT),

 
				"canviewdeletionnotice" => $mybb->get_input('canviewdeletionnotice', MyBB::INPUT_INT),

				"canpostpolls" => $mybb->get_input('canpostpolls', MyBB::INPUT_INT),
"canvotepolls" => $mybb->get_input('canvotepolls', MyBB::INPUT_INT),
"canundovotes" => $mybb->get_input('canundovotes', MyBB::INPUT_INT),

				"canpostpolls" => $mybb->get_input('canpostpolls', MyBB::INPUT_INT),
"canvotepolls" => $mybb->get_input('canvotepolls', MyBB::INPUT_INT),
"canundovotes" => $mybb->get_input('canundovotes', MyBB::INPUT_INT),

Zeile 1015Zeile 1065
		$form->generate_check_box("cancp", 1, $lang->can_access_admin_cp, array("checked" => $mybb->input['cancp']))
);
$form_container->output_row($lang->moderation_administration_options, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $admin_options)."</div>");

		$form->generate_check_box("cancp", 1, $lang->can_access_admin_cp, array("checked" => $mybb->input['cancp']))
);
$form_container->output_row($lang->moderation_administration_options, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $admin_options)."</div>");


$form_container->end();
echo "</div>";

//


$form_container->end();
echo "</div>";

//

	// FORUMS AND POSTS
//
echo "<div id=\"tab_forums_posts\">";

	// FORUMS AND POSTS
//
echo "<div id=\"tab_forums_posts\">";

Zeile 1069Zeile 1119
		$form->generate_check_box("candeleteposts", 1, $lang->can_delete_posts, array("checked" => $mybb->input['candeleteposts'])),
$form->generate_check_box("candeletethreads", 1, $lang->can_delete_threads, array("checked" => $mybb->input['candeletethreads'])),
$form->generate_check_box("caneditattachments", 1, $lang->can_edit_attachments, array("checked" => $mybb->input['caneditattachments'])),

		$form->generate_check_box("candeleteposts", 1, $lang->can_delete_posts, array("checked" => $mybb->input['candeleteposts'])),
$form->generate_check_box("candeletethreads", 1, $lang->can_delete_threads, array("checked" => $mybb->input['candeletethreads'])),
$form->generate_check_box("caneditattachments", 1, $lang->can_edit_attachments, array("checked" => $mybb->input['caneditattachments'])),

 
		$form->generate_check_box("canviewdeletionnotice", 1, $lang->can_view_deletion_notices, array("checked" => $mybb->input['canviewdeletionnotice'])),

		"{$lang->edit_time_limit}<br /><small class=\"input\">{$lang->edit_time_limit_desc}</small><br />".$form->generate_numeric_field('edittimelimit', $mybb->input['edittimelimit'], array('id' => 'edittimelimit', 'class' => 'field50', 'min' => 0))
);
$form_container->output_row($lang->editing_deleting_options, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $editing_options)."</div>");

		"{$lang->edit_time_limit}<br /><small class=\"input\">{$lang->edit_time_limit_desc}</small><br />".$form->generate_numeric_field('edittimelimit', $mybb->input['edittimelimit'], array('id' => 'edittimelimit', 'class' => 'field50', 'min' => 0))
);
$form_container->output_row($lang->editing_deleting_options, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $editing_options)."</div>");

Zeile 1101Zeile 1152
		$form->generate_check_box("candeletereputations", 1, $lang->can_delete_own_reputation, array("checked" => $mybb->input['candeletereputations'])),
"{$lang->points_to_award_take}<br /><small class=\"input\">{$lang->points_to_award_take_desc}</small><br />".$form->generate_numeric_field('reputationpower', $mybb->input['reputationpower'], array('id' => 'reputationpower', 'class' => 'field50', 'min' => 0)),
"{$lang->max_reputations_perthread}<br /><small class=\"input\">{$lang->max_reputations_perthread_desc}</small><br />".$form->generate_numeric_field('maxreputationsperthread', $mybb->input['maxreputationsperthread'], array('id' => 'maxreputationsperthread', 'class' => 'field50', 'min' => 0)),

		$form->generate_check_box("candeletereputations", 1, $lang->can_delete_own_reputation, array("checked" => $mybb->input['candeletereputations'])),
"{$lang->points_to_award_take}<br /><small class=\"input\">{$lang->points_to_award_take_desc}</small><br />".$form->generate_numeric_field('reputationpower', $mybb->input['reputationpower'], array('id' => 'reputationpower', 'class' => 'field50', 'min' => 0)),
"{$lang->max_reputations_perthread}<br /><small class=\"input\">{$lang->max_reputations_perthread_desc}</small><br />".$form->generate_numeric_field('maxreputationsperthread', $mybb->input['maxreputationsperthread'], array('id' => 'maxreputationsperthread', 'class' => 'field50', 'min' => 0)),

 
		"{$lang->max_reputations_peruser}<br /><small class=\"input\">{$lang->max_reputations_peruser_desc}</small><br />".$form->generate_numeric_field('maxreputationsperuser', $mybb->input['maxreputationsperuser'], array('id' => 'maxreputationsperuser', 'class' => 'field50', 'min' => 0)),

		"{$lang->max_reputations_daily}<br /><small class=\"input\">{$lang->max_reputations_daily_desc}</small><br />".$form->generate_numeric_field('maxreputationsday', $mybb->input['maxreputationsday'], array('id' => 'maxreputationsday', 'class' => 'field50', 'min' => 0))
);
$form_container->output_row($lang->reputation_system, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $reputation_options)."</div>");

		"{$lang->max_reputations_daily}<br /><small class=\"input\">{$lang->max_reputations_daily_desc}</small><br />".$form->generate_numeric_field('maxreputationsday', $mybb->input['maxreputationsday'], array('id' => 'maxreputationsday', 'class' => 'field50', 'min' => 0))
);
$form_container->output_row($lang->reputation_system, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $reputation_options)."</div>");

Zeile 1220Zeile 1272

if($mybb->request_method == "post")
{


if($mybb->request_method == "post")
{

		// Move any users back to the registered group
$updated_users = array("usergroup" => 2);










		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");

		$db->update_query("users", $updated_users, "usergroup='{$usergroup['gid']}'");

$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)

Zeile 1243Zeile 1304
			leave_usergroup($user['uid'], $usergroup['gid']);
}


			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 1252Zeile 1321
		$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 1376Zeile 1446
	");
while($leader = $db->fetch_array($query))
{

	");
while($leader = $db->fetch_array($query))
{

		$leaders[$leader['gid']][] = build_profile_link($leader['username'], $leader['uid'], "_blank");

		$leaders[$leader['gid']][] = build_profile_link(htmlspecialchars_uni($leader['username']), $leader['uid'], "_blank");

	}

$form_container = new FormContainer($lang->user_groups);

	}

$form_container = new FormContainer($lang->user_groups);

Zeile 1400Zeile 1470
		$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 = '';