Vergleich modcp.php - 1.8.16 - 1.8.26

  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 2671Zeile 2670
			if(empty($mybb->input[$option['action']]))
{
if($user[$option['update_field']] == 1)

			if(empty($mybb->input[$option['action']]))
{
if($user[$option['update_field']] == 1)

				{

				{

					// We're revoking the suspension
$extra_user_updates[$option['update_field']] = 0;
$extra_user_updates[$option['update_length']] = 0;

					// We're revoking the suspension
$extra_user_updates[$option['update_field']] = 0;
$extra_user_updates[$option['update_length']] = 0;

Zeile 2684Zeile 2683
			else
{
if($mybb->input[$option['time']] == 0 && $mybb->input[$option['period']] != "never" && $user[$option['update_field']] != 1)

			else
{
if($mybb->input[$option['time']] == 0 && $mybb->input[$option['period']] != "never" && $user[$option['update_field']] != 1)

				{

				{

					// User has selected a type of ban, but not entered a valid time frame
$string = $option['action']."_error";
$errors[] = $lang->$string;
}

					// User has selected a type of ban, but not entered a valid time frame
$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 2700Zeile 2698
						if($suspend_length == "-1")
{
// Permanent ban on action

						if($suspend_length == "-1")
{
// Permanent ban on action

							$extra_user_updates[$option['update_length']] = 0;

							$extra_user_updates[$option['update_length']] = 0;

						}
elseif($suspend_length && $suspend_length != "-1")
{

						}
elseif($suspend_length && $suspend_length != "-1")
{

Zeile 2732Zeile 2730
			$errors[] = $lang->suspendmoderate_error;
}


			$errors[] = $lang->suspendmoderate_error;
}


		if(is_array($errors))

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

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

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

Zeile 2780Zeile 2778

// Set display group
$displaygroupfields = array("title", "description", "namestyle", "usertitle", "stars", "starimage", "image");


// Set display group
$displaygroupfields = array("title", "description", "namestyle", "usertitle", "stars", "starimage", "image");

 

if(!$user['displaygroup'])
{
$user['displaygroup'] = $user['usergroup'];
}


	$display_group = usergroup_displaygroup($user['displaygroup']);
if(is_array($display_group))
{

	$display_group = usergroup_displaygroup($user['displaygroup']);
if(is_array($display_group))
{

Zeile 2807Zeile 2811
		if(!isset($birthday[2]))
{
$birthday[2] = '';

		if(!isset($birthday[2]))
{
$birthday[2] = '';

		}

		}

		list($mybb->input['birthday_day'], $mybb->input['birthday_month'], $mybb->input['birthday_year']) = $birthday;
}

		list($mybb->input['birthday_day'], $mybb->input['birthday_month'], $mybb->input['birthday_year']) = $birthday;
}

	else
{
$errors = inline_error($errors);
}


	else
{
$errors = inline_error($errors);
}


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

	}

	}


// Custom user title
if(!empty($userperms['usertitle']))
{
$defaulttitle = htmlspecialchars_uni($userperms['usertitle']);


// Custom user title
if(!empty($userperms['usertitle']))
{
$defaulttitle = htmlspecialchars_uni($userperms['usertitle']);

	}

	}

	else
{
// Go for post count title if a group default isn't set

	else
{
// Go for post count title if a group default isn't set

Zeile 2836Zeile 2840
			if($title['posts'] <= $user['postnum'])
{
$defaulttitle = $title['title'];

			if($title['posts'] <= $user['postnum'])
{
$defaulttitle = $title['title'];

				break;
}
}
}

$user['usertitle'] = htmlspecialchars_uni($user['usertitle']);


				break;
}
}
}

$user['usertitle'] = htmlspecialchars_uni($user['usertitle']);


	if(empty($user['usertitle']))
{
$lang->current_custom_usertitle = '';

	if(empty($user['usertitle']))
{
$lang->current_custom_usertitle = '';

Zeile 2897Zeile 2901
				$awaydate = my_date($mybb->settings['dateformat'], $user['awaydate']);
$awaycheck[1] = "checked=\"checked\"";
$awaynotice = $lang->sprintf($lang->away_notice_away, $awaydate);

				$awaydate = my_date($mybb->settings['dateformat'], $user['awaydate']);
$awaycheck[1] = "checked=\"checked\"";
$awaynotice = $lang->sprintf($lang->away_notice_away, $awaydate);

			}
else

			}
else

			{
$awaynotice = $lang->away_notice;
$awaycheck[0] = "checked=\"checked\"";

			{
$awaynotice = $lang->away_notice;
$awaycheck[0] = "checked=\"checked\"";

Zeile 3004Zeile 3008

$sel = "";
if(isset($seloptions[$val]) && $val == $seloptions[$val])


$sel = "";
if(isset($seloptions[$val]) && $val == $seloptions[$val])

						{
$sel = " selected=\"selected\"";
}

eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");

						{
$sel = " selected=\"selected\"";
}

eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");

					}
if(!$profilefield['length'])
{

					}
if(!$profilefield['length'])
{

Zeile 3063Zeile 3067
			elseif($type == "checkbox")
{
if($errors)

			elseif($type == "checkbox")
{
if($errors)

				{

				{

					$useropts = $userfield;
}
else

					$useropts = $userfield;
}
else

Zeile 3283Zeile 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 3431Zeile 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 3572Zeile 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']))

Zeile 3950Zeile 3959
					if(!$ipaddress['username'])
{
$ipaddress['username'] = $ipaddress['postusername']; // Guest username support

					if(!$ipaddress['username'])
{
$ipaddress['username'] = $ipaddress['postusername']; // Guest username support

					}

					}

					$ipaddress['username'] = htmlspecialchars_uni($ipaddress['username']);
$trow = alt_trow();
if(!$ipaddress['subject'])

					$ipaddress['username'] = htmlspecialchars_uni($ipaddress['username']);
$trow = alt_trow();
if(!$ipaddress['subject'])

Zeile 3966Zeile 3975
					eval("\$results .= \"".$templates->get("modcp_ipsearch_result")."\";");
}
}

					eval("\$results .= \"".$templates->get("modcp_ipsearch_result")."\";");
}
}

		}

		}


if(!$results)


if(!$results)

		{

		{

			eval("\$results = \"".$templates->get("modcp_ipsearch_noresults")."\";");
}

if($ipaddressvalue)
{
$lang->ipsearch_results = $lang->sprintf($lang->ipsearch_results, $ipaddressvalue);

			eval("\$results = \"".$templates->get("modcp_ipsearch_noresults")."\";");
}

if($ipaddressvalue)
{
$lang->ipsearch_results = $lang->sprintf($lang->ipsearch_results, $ipaddressvalue);

		}
else
{

		}
else
{

			$lang->ipsearch_results = $lang->ipsearch;
}


			$lang->ipsearch_results = $lang->ipsearch;
}


Zeile 4142Zeile 4151
		if($banned['reason'])
{
$banned['reason'] = htmlspecialchars_uni($parser->parse_badwords($banned['reason']));

		if($banned['reason'])
{
$banned['reason'] = htmlspecialchars_uni($parser->parse_badwords($banned['reason']));

		}
else
{

		}
else
{

			$banned['reason'] = $lang->na;
}


			$banned['reason'] = $lang->na;
}


Zeile 4171Zeile 4180
			if($remaining < 3600)
{
$banned_class = "high_banned";

			if($remaining < 3600)
{
$banned_class = "high_banned";

			}

			}

			else if($remaining < 86400)
{
$banned_class = "moderate_banned";

			else if($remaining < 86400)
{
$banned_class = "moderate_banned";

Zeile 4224Zeile 4233
	if($mybb->user['uid'] != $ban['admin'] && $mybb->usergroup['issupermod'] != 1 && $mybb->usergroup['cancp'] != 1)
{
error_no_permission();

	if($mybb->user['uid'] != $ban['admin'] && $mybb->usergroup['issupermod'] != 1 && $mybb->usergroup['cancp'] != 1)
{
error_no_permission();

	}

$plugins->run_hooks("modcp_liftban_start");


	}

$plugins->run_hooks("modcp_liftban_start");


	$query = $db->simple_select("users", "username", "uid = '{$ban['uid']}'");
$username = $db->fetch_field($query, "username");

$updated_group = array(
'usergroup' => $ban['oldgroup'],

	$query = $db->simple_select("users", "username", "uid = '{$ban['uid']}'");
$username = $db->fetch_field($query, "username");

$updated_group = array(
'usergroup' => $ban['oldgroup'],

		'additionalgroups' => $ban['oldadditionalgroups'],

		'additionalgroups' => $db->escape_string($ban['oldadditionalgroups']),

		'displaygroup' => $ban['olddisplaygroup']
);
$db->update_query("users", $updated_group, "uid='{$ban['uid']}'");
$db->delete_query("banned", "uid='{$ban['uid']}'");


		'displaygroup' => $ban['olddisplaygroup']
);
$db->update_query("users", $updated_group, "uid='{$ban['uid']}'");
$db->delete_query("banned", "uid='{$ban['uid']}'");


	$cache->update_banned();

 
	$cache->update_moderators();
log_moderator_action(array("uid" => $ban['uid'], "username" => $username), $lang->lifted_ban);


	$cache->update_moderators();
log_moderator_action(array("uid" => $ban['uid'], "username" => $username), $lang->lifted_ban);


Zeile 4256Zeile 4264
	if($mybb->usergroup['canbanusers'] == 0)
{
error_no_permission();

	if($mybb->usergroup['canbanusers'] == 0)
{
error_no_permission();

	}

	}


// Editing an existing ban
if($mybb->get_input('uid', MyBB::INPUT_INT))


// Editing an existing ban
if($mybb->get_input('uid', MyBB::INPUT_INT))

Zeile 4280Zeile 4288
		if($existing_ban && $mybb->user['uid'] != $user['admin'] && $mybb->usergroup['issupermod'] != 1 && $mybb->usergroup['cancp'] != 1)
{
error_no_permission();

		if($existing_ban && $mybb->user['uid'] != $user['admin'] && $mybb->usergroup['issupermod'] != 1 && $mybb->usergroup['cancp'] != 1)
{
error_no_permission();

		}
}

$errors = array();


		}
}

$errors = array();


	// Creating a new ban
if(!$existing_ban)
{

	// Creating a new ban
if(!$existing_ban)
{

Zeile 4361Zeile 4369
		if($existing_ban)
{
$update_array = array(

		if($existing_ban)
{
$update_array = array(

				'gid' => $mybb->get_input('usergroup', MyBB::INPUT_INT),
'dateline' => TIME_NOW,
'bantime' => $db->escape_string($mybb->get_input('liftafter')),
'lifted' => $db->escape_string($lifted),
'reason' => $db->escape_string($banreason)
);


				'gid' => $mybb->get_input('usergroup', MyBB::INPUT_INT),
'dateline' => TIME_NOW,
'bantime' => $db->escape_string($mybb->get_input('liftafter')),
'lifted' => $db->escape_string($lifted),
'reason' => $db->escape_string($banreason)
);


			$db->update_query('banned', $update_array, "uid='{$user['uid']}'");
}
else

			$db->update_query('banned', $update_array, "uid='{$user['uid']}'");
}
else

Zeile 4376Zeile 4384
				'uid' => $user['uid'],
'gid' => $mybb->get_input('usergroup', MyBB::INPUT_INT),
'oldgroup' => (int)$user['usergroup'],

				'uid' => $user['uid'],
'gid' => $mybb->get_input('usergroup', MyBB::INPUT_INT),
'oldgroup' => (int)$user['usergroup'],

				'oldadditionalgroups' => (string)$user['additionalgroups'],

				'oldadditionalgroups' => $db->escape_string($user['additionalgroups']),

				'olddisplaygroup' => (int)$user['displaygroup'],
'admin' => (int)$mybb->user['uid'],
'dateline' => TIME_NOW,

				'olddisplaygroup' => (int)$user['displaygroup'],
'admin' => (int)$mybb->user['uid'],
'dateline' => TIME_NOW,

Zeile 4395Zeile 4403
			'additionalgroups' => '',
);
$db->update_query('users', $update_array, "uid = {$user['uid']}");

			'additionalgroups' => '',
);
$db->update_query('users', $update_array, "uid = {$user['uid']}");


$cache->update_banned();

 

// Log edit or add ban
if($existing_ban)


// Log edit or add ban
if($existing_ban)