Vergleich modcp.php - 1.8.17 - 1.8.22

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 2587Zeile 2587
		"profile_fields_editable" => true,
"website" => $mybb->get_input('website'),
"icq" => $mybb->get_input('icq'),

		"profile_fields_editable" => true,
"website" => $mybb->get_input('website'),
"icq" => $mybb->get_input('icq'),

		"yahoo" => $mybb->get_input('yahoo'),

 
		"skype" => $mybb->get_input('skype'),
"google" => $mybb->get_input('google'),
"signature" => $mybb->get_input('signature'),

		"skype" => $mybb->get_input('skype'),
"google" => $mybb->get_input('google'),
"signature" => $mybb->get_input('signature'),

Zeile 2617Zeile 2616

// Set the data of the user in the datahandler.
$userhandler->set_data($updated_user);


// Set the data of the user in the datahandler.
$userhandler->set_data($updated_user);

	$errors = '';

	$errors = array();


// Validate the user and get any errors that might have occurred.
if(!$userhandler->validate_user())


// Validate the user and get any errors that might have occurred.
if(!$userhandler->validate_user())

Zeile 2689Zeile 2688
					$string = $option['action']."_error";
$errors[] = $lang->$string;
}

					$string = $option['action']."_error";
$errors[] = $lang->$string;
}


if(!is_array($errors))

				else


				{
$suspend_length = fetch_time_length((int)$mybb->input[$option['time']], $mybb->input[$option['period']]);


				{
$suspend_length = fetch_time_length((int)$mybb->input[$option['time']], $mybb->input[$option['period']]);


Zeile 2698Zeile 2696
					{
// We already have a suspension, but entered a new time
if($suspend_length == "-1")

					{
// We already have a suspension, but entered a new time
if($suspend_length == "-1")

						{

						{

							// Permanent ban on action
$extra_user_updates[$option['update_length']] = 0;
}
elseif($suspend_length && $suspend_length != "-1")

							// Permanent ban on action
$extra_user_updates[$option['update_length']] = 0;
}
elseif($suspend_length && $suspend_length != "-1")

						{

						{

							// Temporary ban on action
$extra_user_updates[$option['update_length']] = TIME_NOW + $suspend_length;
}

							// Temporary ban on action
$extra_user_updates[$option['update_length']] = TIME_NOW + $suspend_length;
}

Zeile 2730Zeile 2728
		if(isset($extra_user_updates) && $extra_user_updates['moderateposts'] && $extra_user_updates['suspendposting'])
{
$errors[] = $lang->suspendmoderate_error;

		if(isset($extra_user_updates) && $extra_user_updates['moderateposts'] && $extra_user_updates['suspendposting'])
{
$errors[] = $lang->suspendmoderate_error;

		}

		}





		if(is_array($errors))

		if(is_array($errors) && !empty($errors))

		{
$mybb->input['action'] = "editprofile";
}

		{
$mybb->input['action'] = "editprofile";
}

Zeile 2758Zeile 2756
if($mybb->input['action'] == "editprofile")
{
if($mybb->usergroup['caneditprofiles'] == 0)

if($mybb->input['action'] == "editprofile")
{
if($mybb->usergroup['caneditprofiles'] == 0)

	{
error_no_permission();
}


	{
error_no_permission();
}


	add_breadcrumb($lang->mcp_nav_editprofile, "modcp.php?action=editprofile");

$user = get_user($mybb->get_input('uid', MyBB::INPUT_INT));

	add_breadcrumb($lang->mcp_nav_editprofile, "modcp.php?action=editprofile");

$user = get_user($mybb->get_input('uid', MyBB::INPUT_INT));

Zeile 2772Zeile 2770

// Check if the current user has permission to edit this user
if(!modcp_can_manage_user($user['uid']))


// Check if the current user has permission to edit this user
if(!modcp_can_manage_user($user['uid']))

	{

	{

		error_no_permission();
}


		error_no_permission();
}


Zeile 2800Zeile 2798
	if($user['icq'] != "0")
{
$user['icq'] = (int)$user['icq'];

	if($user['icq'] != "0")
{
$user['icq'] = (int)$user['icq'];

	}


	}


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

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

Zeile 2822Zeile 2820
	}

// Sanitize all input

	}

// Sanitize all input

	foreach(array('usertitle', 'website', 'icq', 'yahoo', 'skype', 'google', 'signature', 'birthday_day', 'birthday_month', 'birthday_year') as $field)

	foreach(array('usertitle', 'website', 'icq', 'skype', 'google', 'signature', 'birthday_day', 'birthday_month', 'birthday_year') as $field)

	{
$mybb->input[$field] = htmlspecialchars_uni($mybb->get_input($field));
}

	{
$mybb->input[$field] = htmlspecialchars_uni($mybb->get_input($field));
}

Zeile 3022Zeile 3020
					}

eval("\$code = \"".$templates->get("usercp_profile_profilefields_multiselect")."\";");

					}

eval("\$code = \"".$templates->get("usercp_profile_profilefields_multiselect")."\";");

				}
}

				}
}

			elseif($type == "select")
{
$expoptions = explode("\n", $options);

			elseif($type == "select")
{
$expoptions = explode("\n", $options);

Zeile 3289Zeile 3287
	$user_icq = $mybb->input['icq'];
$user_skype = $mybb->input['skype'];
$user_google = $mybb->input['google'];

	$user_icq = $mybb->input['icq'];
$user_skype = $mybb->input['skype'];
$user_google = $mybb->input['google'];

	$user_yahoo = $mybb->input['yahoo'];

 

$plugins->run_hooks("modcp_editprofile_end");



$plugins->run_hooks("modcp_editprofile_end");


Zeile 3355Zeile 3352

$query = $db->simple_select("users", "COUNT(uid) AS count", "1=1 {$where}");
$user_count = $db->fetch_field($query, "count");


$query = $db->simple_select("users", "COUNT(uid) AS count", "1=1 {$where}");
$user_count = $db->fetch_field($query, "count");





	// Figure out if we need to display multiple pages.
if($mybb->get_input('page') != "last")

	// Figure out if we need to display multiple pages.
if($mybb->get_input('page') != "last")

	{

	{

		$page = $mybb->get_input('page');

		$page = $mybb->get_input('page');

	}


	}


	$pages = $user_count / $perpage;
$pages = ceil($pages);

	$pages = $user_count / $perpage;
$pages = ceil($pages);





	if($mybb->get_input('page') == "last")
{
$page = $pages;

	if($mybb->get_input('page') == "last")
{
$page = $pages;

	}


	}


	if($page > $pages || $page <= 0)
{

	if($page > $pages || $page <= 0)
{

		$page = 1;
}
if($page)
{

		$page = 1;
}
if($page)
{

		$start = ($page-1) * $perpage;
}
else
{
$start = 0;
$page = 1;

		$start = ($page-1) * $perpage;
}
else
{
$start = 0;
$page = 1;

	}


	}


	$page_url = 'modcp.php?action=finduser';
foreach(array('username', 'sortby', 'order') as $field)
{

	$page_url = 'modcp.php?action=finduser';
foreach(array('username', 'sortby', 'order') as $field)
{

Zeile 3411Zeile 3408
		$regdate = my_date('relative', $user['regdate']);

if($user['invisible'] == 1 && $mybb->usergroup['canviewwolinvis'] != 1 && $user['uid'] != $mybb->user['uid'])

		$regdate = my_date('relative', $user['regdate']);

if($user['invisible'] == 1 && $mybb->usergroup['canviewwolinvis'] != 1 && $user['uid'] != $mybb->user['uid'])

		{

		{

			$lastdate = $lang->lastvisit_never;

if($user['lastvisit'])

			$lastdate = $lang->lastvisit_never;

if($user['lastvisit'])

Zeile 3437Zeile 3434

$plugins->run_hooks("modcp_finduser_end");



$plugins->run_hooks("modcp_finduser_end");


	$username = $mybb->get_input('username');

	$username = htmlspecialchars_uni($mybb->get_input('username'));

	eval("\$finduser = \"".$templates->get("modcp_finduser")."\";");
output_page($finduser);
}

	eval("\$finduser = \"".$templates->get("modcp_finduser")."\";");
output_page($finduser);
}

Zeile 3467Zeile 3464
		$mybb->input['filter']['username'] = '';
}
if(!empty($mybb->input['filter']['uid']))

		$mybb->input['filter']['username'] = '';
}
if(!empty($mybb->input['filter']['uid']))

	{

	{

		$search['uid'] = (int)$mybb->input['filter']['uid'];
$where_sql .= " AND w.uid='{$search['uid']}'";
if(!isset($mybb->input['search']['username']))

		$search['uid'] = (int)$mybb->input['filter']['uid'];
$where_sql .= " AND w.uid='{$search['uid']}'";
if(!isset($mybb->input['search']['username']))

Zeile 3475Zeile 3472
			$user = get_user($mybb->input['search']['uid']);
$mybb->input['search']['username'] = htmlspecialchars_uni($user['username']);
}

			$user = get_user($mybb->input['search']['uid']);
$mybb->input['search']['username'] = htmlspecialchars_uni($user['username']);
}

	}

	}

	else

	else

	{

	{

		$mybb->input['filter']['uid'] = '';

		$mybb->input['filter']['uid'] = '';

	}
if(!empty($mybb->input['filter']['mod_username']))
{

	}
if(!empty($mybb->input['filter']['mod_username']))
{

		$mod_user = get_user_by_username($mybb->input['filter']['mod_username']);

$mybb->input['filter']['mod_uid'] = (int)$mod_user['uid'];

		$mod_user = get_user_by_username($mybb->input['filter']['mod_username']);

$mybb->input['filter']['mod_uid'] = (int)$mod_user['uid'];

Zeile 3550Zeile 3547
		$ordersel['desc'] = ' selected="selected"';
}
else

		$ordersel['desc'] = ' selected="selected"';
}
else

	{

	{

		$ordersel['asc'] = ' selected="selected"';
}


		$ordersel['asc'] = ' selected="selected"';
}


Zeile 3578Zeile 3575
		$per_page = (int)$mybb->input['filter']['per_page'];
}
$start = ($page-1) * $per_page;

		$per_page = (int)$mybb->input['filter']['per_page'];
}
$start = ($page-1) * $per_page;

 
	$pages = ceil($total_warnings / $per_page);
if($page > $pages)
{
$start = 0;
$page = 1;
}

	// Build the base URL for pagination links
$url = 'modcp.php?action=warninglogs';
if(is_array($mybb->input['filter']) && count($mybb->input['filter']))

	// Build the base URL for pagination links
$url = 'modcp.php?action=warninglogs';
if(is_array($mybb->input['filter']) && count($mybb->input['filter']))