Vergleich usercp.php - 1.8.21 - 1.8.22

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 57Zeile 57
usercp_menu();

$server_http_referer = htmlentities($_SERVER['HTTP_REFERER']);

usercp_menu();

$server_http_referer = htmlentities($_SERVER['HTTP_REFERER']);

 

if(my_strpos($server_http_referer, $mybb->settings['bburl'].'/') !== 0)
{
if(my_strpos($server_http_referer, '/') === 0)
{
$server_http_referer = my_substr($server_http_referer, 1);
}
$url_segments = explode('/', $server_http_referer);
$server_http_referer = $mybb->settings['bburl'].'/'.end($url_segments);
}


$plugins->run_hooks("usercp_start");
if($mybb->input['action'] == "do_editsig" && $mybb->request_method == "post")


$plugins->run_hooks("usercp_start");
if($mybb->input['action'] == "do_editsig" && $mybb->request_method == "post")

Zeile 217Zeile 227
		"away" => $away,
"profile_fields" => $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY)
);

		"away" => $away,
"profile_fields" => $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY)
);

	foreach(array('icq', 'yahoo', 'skype', 'google') as $cfield)

	foreach(array('icq', 'skype', 'google') as $cfield)

	{
$csetting = 'allow'.$cfield.'field';
if($mybb->settings[$csetting] == '')

	{
$csetting = 'allow'.$cfield.'field';
if($mybb->settings[$csetting] == '')

Zeile 366Zeile 376
	{
$user['skype'] = htmlspecialchars_uni($user['skype']);
$user['google'] = htmlspecialchars_uni($user['google']);

	{
$user['skype'] = htmlspecialchars_uni($user['skype']);
$user['google'] = htmlspecialchars_uni($user['google']);

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

 
	}

$contact_fields = array();
$contactfields = '';
$cfieldsshow = false;


	}

$contact_fields = array();
$contactfields = '';
$cfieldsshow = false;


	foreach(array('icq', 'yahoo', 'skype', 'google') as $cfield)

	foreach(array('icq', 'skype', 'google') as $cfield)

	{
$contact_fields[$cfield] = '';
$csetting = 'allow'.$cfield.'field';

	{
$contact_fields[$cfield] = '';
$csetting = 'allow'.$cfield.'field';

Zeile 528Zeile 537
					foreach($useropts as $key => $val)
{
$val = htmlspecialchars_uni($val);

					foreach($useropts as $key => $val)
{
$val = htmlspecialchars_uni($val);

						$seloptions[$val] = $val;
}
}
$expoptions = explode("\n", $options);

						$seloptions[$val] = $val;
}
}
$expoptions = explode("\n", $options);

				if(is_array($expoptions))
{
foreach($expoptions as $key => $val)

				if(is_array($expoptions))
{
foreach($expoptions as $key => $val)

Zeile 1002Zeile 1011
	else
{
$showredirectcheck = "";

	else
{
$showredirectcheck = "";

	}

	}


if(isset($user['pmnotify']) && $user['pmnotify'] != 0)
{
$pmnotifycheck = "checked=\"checked\"";
}


if(isset($user['pmnotify']) && $user['pmnotify'] != 0)
{
$pmnotifycheck = "checked=\"checked\"";
}

	else
{
$pmnotifycheck = '';
}


	else
{
$pmnotifycheck = '';
}


	if(isset($user['buddyrequestspm']) && $user['buddyrequestspm'] != 0)
{
$buddyrequestspmcheck = "checked=\"checked\"";

	if(isset($user['buddyrequestspm']) && $user['buddyrequestspm'] != 0)
{
$buddyrequestspmcheck = "checked=\"checked\"";

Zeile 1025Zeile 1034
	if(isset($user['buddyrequestsauto']) && $user['buddyrequestsauto'] != 0)
{
$buddyrequestsautocheck = "checked=\"checked\"";

	if(isset($user['buddyrequestsauto']) && $user['buddyrequestsauto'] != 0)
{
$buddyrequestsautocheck = "checked=\"checked\"";

	}

	}

	else
{
$buddyrequestsautocheck = '';

	else
{
$buddyrequestsautocheck = '';

	}

if(!isset($user['threadmode']) || ($user['threadmode'] != "threaded" && $user['threadmode'] != "linear"))
{
$user['threadmode'] = ''; // Leave blank to show default

	}

if(!isset($user['threadmode']) || ($user['threadmode'] != "threaded" && $user['threadmode'] != "linear"))
{
$user['threadmode'] = ''; // Leave blank to show default

	}

if(isset($user['classicpostbit']) && $user['classicpostbit'] != 0)
{
$classicpostbitcheck = "checked=\"checked\"";

	}

if(isset($user['classicpostbit']) && $user['classicpostbit'] != 0)
{
$classicpostbitcheck = "checked=\"checked\"";

	}

	}

	else
{
$classicpostbitcheck = '';

	else
{
$classicpostbitcheck = '';

Zeile 1053Zeile 1062
		{
$selected = " selected=\"selected\"";
}

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





		$dateformat = my_date($format, TIME_NOW, "", 0);
eval("\$date_format_options .= \"".$templates->get("usercp_options_date_format")."\";");
}

$time_format_options = $timeformat = '';
foreach($time_formats as $key => $format)

		$dateformat = my_date($format, TIME_NOW, "", 0);
eval("\$date_format_options .= \"".$templates->get("usercp_options_date_format")."\";");
}

$time_format_options = $timeformat = '';
foreach($time_formats as $key => $format)

	{

	{

		$selected = '';
if(isset($user['timeformat']) && $user['timeformat'] == $key)
{

		$selected = '';
if(isset($user['timeformat']) && $user['timeformat'] == $key)
{

Zeile 1069Zeile 1078

$timeformat = my_date($format, TIME_NOW, "", 0);
eval("\$time_format_options .= \"".$templates->get("usercp_options_time_format")."\";");


$timeformat = my_date($format, TIME_NOW, "", 0);
eval("\$time_format_options .= \"".$templates->get("usercp_options_time_format")."\";");

	}


	}


	$tzselect = build_timezone_select("timezoneoffset", $mybb->user['timezone'], true);

$pms_from_buddys = '';
if($mybb->settings['allowbuddyonly'] == 1)
{
eval("\$pms_from_buddys = \"".$templates->get("usercp_options_pms_from_buddys")."\";");

	$tzselect = build_timezone_select("timezoneoffset", $mybb->user['timezone'], true);

$pms_from_buddys = '';
if($mybb->settings['allowbuddyonly'] == 1)
{
eval("\$pms_from_buddys = \"".$templates->get("usercp_options_pms_from_buddys")."\";");

	}


	}


	$pms = '';
if($mybb->settings['enablepms'] != 0 && $mybb->usergroup['canusepms'] == 1)

	$pms = '';
if($mybb->settings['enablepms'] != 0 && $mybb->usergroup['canusepms'] == 1)

	{

	{

		eval("\$pms = \"".$templates->get("usercp_options_pms")."\";");
}


		eval("\$pms = \"".$templates->get("usercp_options_pms")."\";");
}


Zeile 1089Zeile 1098
	if($mybb->settings['quickreply'] == 1)
{
eval("\$quick_reply = \"".$templates->get("usercp_options_quick_reply")."\";");

	if($mybb->settings['quickreply'] == 1)
{
eval("\$quick_reply = \"".$templates->get("usercp_options_quick_reply")."\";");

	}

	}


$threadview = array('linear' => '', 'threaded' => '');
if(isset($user['threadmode']) && is_scalar($user['threadmode']))


$threadview = array('linear' => '', 'threaded' => '');
if(isset($user['threadmode']) && is_scalar($user['threadmode']))

Zeile 1148Zeile 1157
				$val = trim($val);
$selected = "";
if(isset($user['ppp']) && $user['ppp'] == $val)

				$val = trim($val);
$selected = "";
if(isset($user['ppp']) && $user['ppp'] == $val)

				{

				{

					$selected = " selected=\"selected\"";
}


					$selected = " selected=\"selected\"";
}


Zeile 1236Zeile 1245
						break;
}
my_mail($mybb->user['email'], $emailsubject, $emailmessage);

						break;
}
my_mail($mybb->user['email'], $emailsubject, $emailmessage);


$plugins->run_hooks("usercp_do_email_changed");


$plugins->run_hooks("usercp_do_email_changed");

				redirect("usercp.php?action=email", $lang->redirect_emailupdated);
}
elseif($mybb->usergroup['cancp'] != 1 && ($mybb->settings['regtype'] == "verify" || $mybb->settings['regtype'] == "both"))

				redirect("usercp.php?action=email", $lang->redirect_emailupdated);
}
elseif($mybb->usergroup['cancp'] != 1 && ($mybb->settings['regtype'] == "verify" || $mybb->settings['regtype'] == "both"))

Zeile 1296Zeile 1305
	else
{
$email = $email2 = '';

	else
{
$email = $email2 = '';

	}

	}


$plugins->run_hooks("usercp_email");



$plugins->run_hooks("usercp_email");


Zeile 1308Zeile 1317
{
// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));

{
// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));





	$errors = array();

$plugins->run_hooks("usercp_do_password_start");

	$errors = array();

$plugins->run_hooks("usercp_do_password_start");

Zeile 1326Zeile 1335
			"uid" => $mybb->user['uid'],
"password" => $mybb->get_input('password'),
"password2" => $mybb->get_input('password2')

			"uid" => $mybb->user['uid'],
"password" => $mybb->get_input('password'),
"password2" => $mybb->get_input('password2')

		);

		);


$userhandler->set_data($user);



$userhandler->set_data($user);


Zeile 1367Zeile 1376
{
// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));

{
// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));

 

$errors = array();


$plugins->run_hooks("usercp_do_changename_start");
if($mybb->usergroup['canchangename'] != 1)


$plugins->run_hooks("usercp_do_changename_start");
if($mybb->usergroup['canchangename'] != 1)

Zeile 1414Zeile 1425
{
$plugins->run_hooks("usercp_changename_start");
if($mybb->usergroup['canchangename'] != 1)

{
$plugins->run_hooks("usercp_changename_start");
if($mybb->usergroup['canchangename'] != 1)

	{

	{

		error_no_permission();

		error_no_permission();

	}

$plugins->run_hooks("usercp_changename_end");











	}

// Coming back to this page after one or more errors were experienced, show field the user previously entered (with the exception of the password)
if($errors)
{
$username = htmlspecialchars_uni($mybb->get_input('username'));
}
else
{
$username = '';
}

$plugins->run_hooks("usercp_changename_end");


eval("\$changename = \"".$templates->get("usercp_changename")."\";");
output_page($changename);


eval("\$changename = \"".$templates->get("usercp_changename")."\";");
output_page($changename);

Zeile 1444Zeile 1465
	if($mybb->get_input('do') == "delete")
{
$db->delete_query("threadsubscriptions", "tid IN ($tids) AND uid='{$mybb->user['uid']}'");

	if($mybb->get_input('do') == "delete")
{
$db->delete_query("threadsubscriptions", "tid IN ($tids) AND uid='{$mybb->user['uid']}'");

	}

	}

	// Changing subscription type
else
{

	// Changing subscription type
else
{

Zeile 1455Zeile 1476
		elseif($mybb->get_input('do') == "email_notification")
{
$new_notification = 1;

		elseif($mybb->get_input('do') == "email_notification")
{
$new_notification = 1;

		}

		}

		elseif($mybb->get_input('do') == "pm_notification")
{
$new_notification = 2;

		elseif($mybb->get_input('do') == "pm_notification")
{
$new_notification = 2;

Zeile 1473Zeile 1494
if($mybb->input['action'] == "subscriptions")
{
$plugins->run_hooks("usercp_subscriptions_start");

if($mybb->input['action'] == "subscriptions")
{
$plugins->run_hooks("usercp_subscriptions_start");





	// Thread visiblity
$visible = "AND t.visible != 0";
if(is_moderator() == true)

	// Thread visiblity
$visible = "AND t.visible != 0";
if(is_moderator() == true)

Zeile 1944Zeile 1965

if($mybb->get_input('referrer'))
{


if($mybb->get_input('referrer'))
{

		$url = htmlspecialchars_uni($mybb->get_input('referrer'));













		$mybb->input['referrer'] = $mybb->get_input('referrer');

if(my_strpos($mybb->input['referrer'], $mybb->settings['bburl'].'/') !== 0)
{
if(my_strpos($mybb->input['referrer'], '/') === 0)
{
$mybb->input['referrer'] = my_substr($mybb->input['url'], 1);
}
$url_segments = explode('/', $mybb->input['referrer']);
$mybb->input['referrer'] = $mybb->settings['bburl'].'/'.end($url_segments);
}

$url = htmlspecialchars_uni($mybb->input['referrer']);

	}
else
{

	}
else
{