Vergleich admin/modules/user/groups.php - 1.8.27 - 1.8.37

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 122Zeile 122
	$query = $db->simple_select("joinrequests", "*", "rid='".$mybb->input['rid']."'");
$request = $db->fetch_array($query);


	$query = $db->simple_select("joinrequests", "*", "rid='".$mybb->input['rid']."'");
$request = $db->fetch_array($query);


	if(!$request['rid'])

	if(!$request)

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


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


	if(!verify_post_check($mybb->input['my_post_key']))

	if(!verify_post_check($mybb->get_input('my_post_key')))

	{
flash_message($lang->invalid_post_verify_key2, 'error');
admin_redirect("index.php?module=user-groups&action=join_requests&gid={$request['gid']}");

	{
flash_message($lang->invalid_post_verify_key2, 'error');
admin_redirect("index.php?module=user-groups&action=join_requests&gid={$request['gid']}");

Zeile 153Zeile 153
	$query = $db->simple_select("joinrequests", "*", "rid='".$mybb->input['rid']."'");
$request = $db->fetch_array($query);


	$query = $db->simple_select("joinrequests", "*", "rid='".$mybb->input['rid']."'");
$request = $db->fetch_array($query);


	if(!$request['rid'])

	if(!$request)

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


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


	if(!verify_post_check($mybb->input['my_post_key']))

	if(!verify_post_check($mybb->get_input('my_post_key')))

	{
flash_message($lang->invalid_post_verify_key2, 'error');
admin_redirect("index.php?module=user-groups&action=join_requests&gid={$request['gid']}");

	{
flash_message($lang->invalid_post_verify_key2, 'error');
admin_redirect("index.php?module=user-groups&action=join_requests&gid={$request['gid']}");

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


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


	if(!$group['gid'] || $group['type'] != 4)

	if(!$group || $group['type'] != 4)

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

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

Zeile 238Zeile 238
	$num_requests = $db->fetch_field($query, "num_requests");

$per_page = 20;

	$num_requests = $db->fetch_field($query, "num_requests");

$per_page = 20;


if($mybb->input['page'] > 0)

	$pagenum = $mybb->get_input('page', MyBB::INPUT_INT);
if($pagenum)

	{

	{

		$current_page = $mybb->get_input('page', MyBB::INPUT_INT);
$start = ($current_page-1)*$per_page;
$pages = $num_requests / $per_page;
$pages = ceil($pages);
if($current_page > $pages)

		$start = ($pagenum - 1) * $per_page;
$pages = ceil($num_requests / $per_page);
if($pagenum > $pages)



		{
$start = 0;

		{
$start = 0;

			$current_page = 1;

			$pagenum = 1;

		}
}
else
{
$start = 0;

		}
}
else
{
$start = 0;

		$current_page = 1;

		$pagenum = 1;

	}

// Do we need to construct the pagination?
$pagination = '';
if($num_requests > $per_page)
{

	}

// Do we need to construct the pagination?
$pagination = '';
if($num_requests > $per_page)
{

		$pagination = draw_admin_pagination($page, $per_page, $num_requests, "index.php?module=user-groups&action=join_requests&gid={$group['gid']}");

		$pagination = draw_admin_pagination($pagenum, $per_page, $num_requests, "index.php?module=user-groups&action=join_requests&gid={$group['gid']}");

		echo $pagination;
}


		echo $pagination;
}


Zeile 318Zeile 316
	$query = $db->simple_select("usergroups", "*", "gid='".$mybb->get_input('gid', MyBB::INPUT_INT)."'");
$group = $db->fetch_array($query);


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


	if(!$group['gid'])

	if(!$group)

	{
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 327Zeile 325
	$plugins->run_hooks("admin_user_groups_add_leader");

$user = get_user_by_username($mybb->input['username'], array('fields' => 'username'));

	$plugins->run_hooks("admin_user_groups_add_leader");

$user = get_user_by_username($mybb->input['username'], array('fields' => 'username'));

	if(empty($user['uid']))

	if(!$user)

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

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

Zeile 385Zeile 383
	$query = $db->simple_select("usergroups", "*", "gid='".$mybb->get_input('gid', MyBB::INPUT_INT)."'");
$group = $db->fetch_array($query);


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


	if(!$group['gid'])

	if(!$group)

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

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

Zeile 545Zeile 543
		WHERE l.lid='".$mybb->get_input('lid', MyBB::INPUT_INT)."'");
$leader = $db->fetch_array($query);


		WHERE l.lid='".$mybb->get_input('lid', MyBB::INPUT_INT)."'");
$leader = $db->fetch_array($query);


	if(!$leader['lid'])

	if(!$leader)

	{
flash_message($lang->error_invalid_group_leader, 'error');
admin_redirect("index.php?module=user-groups");

	{
flash_message($lang->error_invalid_group_leader, 'error');
admin_redirect("index.php?module=user-groups");

Zeile 595Zeile 593
	");
$leader = $db->fetch_array($query);


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


	if(!$leader['lid'])

	if(!$leader)

	{
flash_message($lang->error_invalid_group_leader, 'error');
admin_redirect("index.php?module=user-groups");

	{
flash_message($lang->error_invalid_group_leader, 'error');
admin_redirect("index.php?module=user-groups");

Zeile 803Zeile 801
	$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)

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

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

		if(preg_match("#<((m[^a])|(b[^diloru>])|(s[^aemptu>]))(\s*[^>]*)>#si", $mybb->get_input('namestyle')))

		if(preg_match("#<((m[^a])|(b[^diloru>])|(s[^aemptu >]))(\s*[^>]*)>#si", $mybb->get_input('namestyle')))

		{
$errors[] = $lang->error_disallowed_namestyle_username;
$mybb->input['namestyle'] = $usergroup['namestyle'];

		{
$errors[] = $lang->error_disallowed_namestyle_username;
$mybb->input['namestyle'] = $usergroup['namestyle'];

Zeile 1147Zeile 1145
	$form_container->output_row($lang->attachment_options, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $attachment_options)."</div>");

// Remove these options if the group being editied is Guest (GID=1)

	$form_container->output_row($lang->attachment_options, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $attachment_options)."</div>");

// Remove these options if the group being editied is Guest (GID=1)

	if($usergroup['gid'] != 1) 

	if($usergroup['gid'] != 1)

	{
$editing_options = array(
$form->generate_check_box("caneditposts", 1, $lang->can_edit_posts, array("checked" => $mybb->input['caneditposts'])),

	{
$editing_options = array(
$form->generate_check_box("caneditposts", 1, $lang->can_edit_posts, array("checked" => $mybb->input['caneditposts'])),

Zeile 1288Zeile 1286
	$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)

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

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