Vergleich usercp.php - 1.8.16 - 1.8.18

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 1869Zeile 1869
	verify_post_check($mybb->get_input('my_post_key'));

$thread = get_thread($mybb->get_input('tid'));

	verify_post_check($mybb->get_input('my_post_key'));

$thread = get_thread($mybb->get_input('tid'));

	if(!$thread)

	if(!$thread || $thread['visible'] == -1)

	{
error($lang->error_invalidthread);
}

	{
error($lang->error_invalidthread);
}

Zeile 1946Zeile 1946
	else
{
$thread = get_thread($mybb->get_input('tid', MyBB::INPUT_INT));

	else
{
$thread = get_thread($mybb->get_input('tid', MyBB::INPUT_INT));

		if(!$thread)

		if(!$thread || $thread['visible'] == -1)

		{
error($lang->error_invalidthread);
}

		{
error($lang->error_invalidthread);
}

Zeile 2004Zeile 2004
		eval("\$add_subscription = \"".$templates->get("usercp_addsubscription_thread")."\";");
output_page($add_subscription);
exit;

		eval("\$add_subscription = \"".$templates->get("usercp_addsubscription_thread")."\";");
output_page($add_subscription);
exit;

	}

	}

}

}





if($mybb->input['action'] == "removesubscription")
{
// Verify incoming POST request

if($mybb->input['action'] == "removesubscription")
{
// Verify incoming POST request

Zeile 2018Zeile 2018
		if(!$forum)
{
error($lang->error_invalidforum);

		if(!$forum)
{
error($lang->error_invalidforum);

		}

		}


// check if the forum requires a password to view. If so, we need to show a form to the user
check_forum_password($forum['fid']);


// check if the forum requires a password to view. If so, we need to show a form to the user
check_forum_password($forum['fid']);

Zeile 2027Zeile 2027
		$plugins->run_hooks("usercp2_removesubscription_forum");

remove_subscribed_forum($forum['fid']);

		$plugins->run_hooks("usercp2_removesubscription_forum");

remove_subscribed_forum($forum['fid']);

		if($server_http_referer && $mybb->request_method != 'post')
{
$url = $server_http_referer;
}
else
{

		if($server_http_referer && $mybb->request_method != 'post')
{
$url = $server_http_referer;
}
else
{

			$url = "usercp.php?action=forumsubscriptions";
}
redirect($url, $lang->redirect_forumsubscriptionremoved);

			$url = "usercp.php?action=forumsubscriptions";
}
redirect($url, $lang->redirect_forumsubscriptionremoved);

Zeile 2118Zeile 2118
	verify_post_check($mybb->get_input('my_post_key'));

$plugins->run_hooks("usercp_do_editsig_start");

	verify_post_check($mybb->get_input('my_post_key'));

$plugins->run_hooks("usercp_do_editsig_start");





	// User currently has a suspended signature
if($mybb->user['suspendsignature'] == 1 && $mybb->user['suspendsigtime'] > TIME_NOW)

	// User currently has a suspended signature
if($mybb->user['suspendsignature'] == 1 && $mybb->user['suspendsigtime'] > TIME_NOW)

	{

	{

		error_no_permission();
}


		error_no_permission();
}


Zeile 2147Zeile 2147
	$plugins->run_hooks("usercp_do_editsig_end");
redirect("usercp.php?action=editsig", $lang->redirect_sigupdated);
}

	$plugins->run_hooks("usercp_do_editsig_end");
redirect("usercp.php?action=editsig", $lang->redirect_sigupdated);
}





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

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

Zeile 2165Zeile 2165
	{
$sig = $mybb->get_input('signature');
$template = false;

	{
$sig = $mybb->get_input('signature');
$template = false;

	}

	}


if(!isset($error))


if(!isset($error))

	{

	{

		$error = '';
}


		$error = '';
}


Zeile 2176Zeile 2176
	{
// User currently has no signature and they're suspended
error($lang->sig_suspended);

	{
// User currently has no signature and they're suspended
error($lang->sig_suspended);

	}


	}


	if($mybb->usergroup['canusesig'] != 1)
{
// Usergroup has no permission to use this facility

	if($mybb->usergroup['canusesig'] != 1)
{
// Usergroup has no permission to use this facility

Zeile 2333Zeile 2333
			}

// Because Gravatars are square, hijack the width

			}

// Because Gravatars are square, hijack the width

			list($maxwidth, $maxheight) = explode("x", my_strtolower($mybb->settings['maxavatardims']));

			list($maxwidth, $maxheight) = preg_split('/[|x]/', my_strtolower($mybb->settings['maxavatardims']));

			$maxheight = (int)$maxwidth;

// Rating?

			$maxheight = (int)$maxwidth;

// Rating?

Zeile 2391Zeile 2391
			{
if($width && $height && $mybb->settings['maxavatardims'] != "")
{

			{
if($width && $height && $mybb->settings['maxavatardims'] != "")
{

					list($maxwidth, $maxheight) = explode("x", my_strtolower($mybb->settings['maxavatardims']));

					list($maxwidth, $maxheight) = preg_split('/[|x]/', my_strtolower($mybb->settings['maxavatardims']));

					if(($maxwidth && $width > $maxwidth) || ($maxheight && $height > $maxheight))
{
$lang->error_avatartoobig = $lang->sprintf($lang->error_avatartoobig, $maxwidth, $maxheight);

					if(($maxwidth && $width > $maxwidth) || ($maxheight && $height > $maxheight))
{
$lang->error_avatartoobig = $lang->sprintf($lang->error_avatartoobig, $maxwidth, $maxheight);

Zeile 2454Zeile 2454

if($mybb->settings['maxavatardims'] != "")
{


if($mybb->settings['maxavatardims'] != "")
{

		list($maxwidth, $maxheight) = explode("x", my_strtolower($mybb->settings['maxavatardims']));

		list($maxwidth, $maxheight) = preg_split('/[|x]/', my_strtolower($mybb->settings['maxavatardims']));

		$lang->avatar_note .= "<br />".$lang->sprintf($lang->avatar_note_dimensions, $maxwidth, $maxheight);
}


		$lang->avatar_note .= "<br />".$lang->sprintf($lang->avatar_note_dimensions, $maxwidth, $maxheight);
}


Zeile 2641Zeile 2641
}

elseif($mybb->input['action'] == "cancelrequest")

}

elseif($mybb->input['action'] == "cancelrequest")

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


// Validate request
$query = $db->simple_select('buddyrequests', '*', 'id='.$mybb->get_input('id', MyBB::INPUT_INT).' AND uid='.(int)$mybb->user['uid']);


// Validate request
$query = $db->simple_select('buddyrequests', '*', 'id='.$mybb->get_input('id', MyBB::INPUT_INT).' AND uid='.(int)$mybb->user['uid']);

Zeile 2654Zeile 2654
	}

$plugins->run_hooks("usercp_cancelrequest_start");

	}

$plugins->run_hooks("usercp_cancelrequest_start");





	$db->delete_query('buddyrequests', 'id='.(int)$request['id']);

$plugins->run_hooks("usercp_cancelrequest_end");

	$db->delete_query('buddyrequests', 'id='.(int)$request['id']);

$plugins->run_hooks("usercp_cancelrequest_end");





	redirect("usercp.php?action=editlists", $lang->buddyrequest_cancelled);
}


	redirect("usercp.php?action=editlists", $lang->buddyrequest_cancelled);
}


Zeile 2672Zeile 2672
	$existing_users = array();
$selected_list = array();
if($mybb->get_input('manage') == "ignored")

	$existing_users = array();
$selected_list = array();
if($mybb->get_input('manage') == "ignored")

	{

	{

		if($mybb->user['ignorelist'])
{
$existing_users = explode(",", $mybb->user['ignorelist']);

		if($mybb->user['ignorelist'])
{
$existing_users = explode(",", $mybb->user['ignorelist']);

Zeile 2730Zeile 2730
		// Get the requests we have sent that are still pending
$query = $db->simple_select('buddyrequests', 'touid', 'uid='.(int)$mybb->user['uid']);
$requests = array();

		// Get the requests we have sent that are still pending
$query = $db->simple_select('buddyrequests', 'touid', 'uid='.(int)$mybb->user['uid']);
$requests = array();

		while($req = $db->fetch_array($query))

		while($req = $db->fetch_array($query))

		{
$requests[$req['touid']] = true;
}

		{
$requests[$req['touid']] = true;
}

Zeile 2788Zeile 2788
				}

if(isset($requests[$user['uid']]))

				}

if(isset($requests[$user['uid']]))

				{

				{

					if($mybb->get_input('manage') != "ignored")
{
$error_message = $lang->users_already_sent_request;

					if($mybb->get_input('manage') != "ignored")
{
$error_message = $lang->users_already_sent_request;

Zeile 2846Zeile 2846
						'language' => $user['language'],
'language_file' => 'usercp'
);

						'language' => $user['language'],
'language_file' => 'usercp'
);





					send_pm($pm);

$sent = true;

					send_pm($pm);

$sent = true;

Zeile 2855Zeile 2855
				{
$existing_users[] = $user['uid'];
}

				{
$existing_users[] = $user['uid'];
}

			}
}

			}
}


if($found_users < count($users))


if($found_users < count($users))

		{

		{

			if($error_message)
{
$error_message .= "<br />";

			if($error_message)
{
$error_message .= "<br />";

Zeile 2873Zeile 2873
			if($mybb->get_input('manage') == "ignored")
{
$message = $lang->users_added_to_ignore_list;

			if($mybb->get_input('manage') == "ignored")
{
$message = $lang->users_added_to_ignore_list;

			}
else

			}
else

			{
$message = $lang->users_added_to_buddy_list;
}

			{
$message = $lang->users_added_to_buddy_list;
}

Zeile 3733Zeile 3733
	}

$attachments = '';

	}

$attachments = '';

 

$query = $db->simple_select("attachments", "SUM(filesize) AS ausage, COUNT(aid) AS acount", "uid='".$mybb->user['uid']."'");
$usage = $db->fetch_array($query);
$totalattachments = $usage['acount'];


// Pagination
if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1)


// Pagination
if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1)

Zeile 3742Zeile 3746

$perpage = $mybb->settings['threadsperpage'];
$page = $mybb->get_input('page', MyBB::INPUT_INT);


$perpage = $mybb->settings['threadsperpage'];
$page = $mybb->get_input('page', MyBB::INPUT_INT);





	if($page > 0)
{
$start = ($page-1) * $perpage;

	if($page > 0)
{
$start = ($page-1) * $perpage;

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

	}
else
{

	}
else
{

Zeile 3796Zeile 3806
		}
}


		}
}


	$query = $db->simple_select("attachments", "SUM(filesize) AS ausage, COUNT(aid) AS acount", "uid='".$mybb->user['uid']."'");
$usage = $db->fetch_array($query);

 
	$totalusage = $usage['ausage'];

	$totalusage = $usage['ausage'];

	$totalattachments = $usage['acount'];

 
	$friendlyusage = get_friendly_size((int)$totalusage);
if($mybb->usergroup['attachquota'])
{

	$friendlyusage = get_friendly_size((int)$totalusage);
if($mybb->usergroup['attachquota'])
{