Vergleich xmlhttp.php - 1.8.17 - 1.8.20

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 436Zeile 436
	$post = get_post($mybb->get_input('pid', MyBB::INPUT_INT));

// No result, die.

	$post = get_post($mybb->get_input('pid', MyBB::INPUT_INT));

// No result, die.

	if(!$post)

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

	{
xmlhttp_error($lang->post_doesnt_exist);
}

	{
xmlhttp_error($lang->post_doesnt_exist);
}

Zeile 483Zeile 483
			$lang->edit_time_limit = $lang->sprintf($lang->edit_time_limit, $mybb->usergroup['edittimelimit']);
xmlhttp_error($lang->edit_time_limit);
}

			$lang->edit_time_limit = $lang->sprintf($lang->edit_time_limit, $mybb->usergroup['edittimelimit']);
xmlhttp_error($lang->edit_time_limit);
}

		// User can't edit unapproved post
if($post['visible'] == 0)

		// User can't edit unapproved post unless permitted for own
if($post['visible'] == 0 && !($mybb->settings['showownunapproved'] && $post['uid'] == $mybb->user['uid']))

		{
xmlhttp_error($lang->post_moderation);
}

		{
xmlhttp_error($lang->post_moderation);
}

Zeile 745Zeile 745
			(in_array($quoted_post['fid'], $onlyusfids) && (!$mybb->user['uid'] || $quoted_post['thread_uid'] != $mybb->user['uid']))
)
{

			(in_array($quoted_post['fid'], $onlyusfids) && (!$mybb->user['uid'] || $quoted_post['thread_uid'] != $mybb->user['uid']))
)
{

			continue;





			// Allow quoting from own unapproved post
if($quoted_post['visible'] == 0 && !($mybb->settings['showownunapproved'] && $quoted_post['uid'] == $mybb->user['uid']))
{
continue;
}

		}

$message .= parse_quoted_message($quoted_post, false);
}
if($mybb->settings['maxquotedepth'] != '0')

		}

$message .= parse_quoted_message($quoted_post, false);
}
if($mybb->settings['maxquotedepth'] != '0')

	{

	{

		$message = remove_message_quotes($message);
}

// Send our headers.

		$message = remove_message_quotes($message);
}

// Send our headers.

	header("Content-type: application/json; charset={$charset}");

	header("Content-type: application/json; charset={$charset}");


$plugins->run_hooks("xmlhttp_get_multiquoted_end");



$plugins->run_hooks("xmlhttp_get_multiquoted_end");


Zeile 785Zeile 789
	$db->insert_query("captcha", $regimagearray);
header("Content-type: application/json; charset={$charset}");
echo json_encode(array("imagehash" => $imagehash));

	$db->insert_query("captcha", $regimagearray);
header("Content-type: application/json; charset={$charset}");
echo json_encode(array("imagehash" => $imagehash));

	exit;
}

	exit;
}

else if($mybb->input['action'] == "validate_captcha")

else if($mybb->input['action'] == "validate_captcha")

{
header("Content-type: application/json; charset={$charset}");

{
header("Content-type: application/json; charset={$charset}");

	$imagehash = $db->escape_string($mybb->get_input('imagehash'));
$query = $db->simple_select("captcha", "imagestring", "imagehash='$imagehash'");

	$imagehash = $db->escape_string($mybb->get_input('imagehash'));
$query = $db->simple_select("captcha", "imagestring", "imagehash='$imagehash'");

	if($db->num_rows($query) == 0)
{

	if($db->num_rows($query) == 0)
{

		echo json_encode($lang->captcha_valid_not_exists);
exit;
}
$imagestring = $db->fetch_field($query, 'imagestring');

		echo json_encode($lang->captcha_valid_not_exists);
exit;
}
$imagestring = $db->fetch_field($query, 'imagestring');





	$plugins->run_hooks("xmlhttp_validate_captcha");

if(my_strtolower($imagestring) == my_strtolower($mybb->get_input('imagestring')))

	$plugins->run_hooks("xmlhttp_validate_captcha");

if(my_strtolower($imagestring) == my_strtolower($mybb->get_input('imagestring')))

	{

	{

		//echo json_encode(array("success" => $lang->captcha_matches));
echo json_encode("true");

		//echo json_encode(array("success" => $lang->captcha_matches));
echo json_encode("true");

		exit;
}

		exit;
}

	else
{
echo json_encode($lang->captcha_does_not_match);

	else
{
echo json_encode($lang->captcha_does_not_match);

Zeile 820Zeile 824
	$sid = $db->escape_string($mybb->get_input('question_id'));
$query = $db->query("
SELECT q.qid, s.sid

	$sid = $db->escape_string($mybb->get_input('question_id'));
$query = $db->query("
SELECT q.qid, s.sid

		FROM ".TABLE_PREFIX."questionsessions s
LEFT JOIN ".TABLE_PREFIX."questions q ON (q.qid=s.qid)
WHERE q.active='1' AND s.sid='{$sid}'
");

if($db->num_rows($query) == 0)
{

		FROM ".TABLE_PREFIX."questionsessions s
LEFT JOIN ".TABLE_PREFIX."questions q ON (q.qid=s.qid)
WHERE q.active='1' AND s.sid='{$sid}'
");

if($db->num_rows($query) == 0)
{

		xmlhttp_error($lang->answer_valid_not_exists);
}


		xmlhttp_error($lang->answer_valid_not_exists);
}


Zeile 948Zeile 952
	header("Content-type: application/json; charset={$charset}");

if(empty($username))

	header("Content-type: application/json; charset={$charset}");

if(empty($username))

	{

	{

		echo json_encode($lang->banned_characters_username);
exit;
}

		echo json_encode($lang->banned_characters_username);
exit;
}

Zeile 1029Zeile 1033
else if($mybb->input['action'] == "get_buddyselect")
{
// Send our headers.

else if($mybb->input['action'] == "get_buddyselect")
{
// Send our headers.

	header("Content-type: text/plain; charset={$charset}");

	header("Content-type: text/plain; charset={$charset}");


if($mybb->user['buddylist'] != "")
{


if($mybb->user['buddylist'] != "")
{

Zeile 1039Zeile 1043
		);

$plugins->run_hooks("xmlhttp_get_buddyselect_start");

		);

$plugins->run_hooks("xmlhttp_get_buddyselect_start");





		$timecut = TIME_NOW - $mybb->settings['wolcutoff'];
$query = $db->simple_select("users", "uid, username, usergroup, displaygroup, lastactive, lastvisit, invisible", "uid IN ({$mybb->user['buddylist']})", $query_options);
$online = array();

		$timecut = TIME_NOW - $mybb->settings['wolcutoff'];
$query = $db->simple_select("users", "uid, username, usergroup, displaygroup, lastactive, lastvisit, invisible", "uid IN ({$mybb->user['buddylist']})", $query_options);
$online = array();

Zeile 1070Zeile 1074
	{
xmlhttp_error($lang->buddylist_error);
}

	{
xmlhttp_error($lang->buddylist_error);
}

 
}
else if($mybb->input['action'] == 'get_referrals')
{
$lang->load('member');
$uid = $mybb->get_input('uid', MYBB::INPUT_INT);

if (!$uid) {
xmlhttp_error($lang->referrals_no_user_specified);
}

$referrals = get_user_referrals($uid);

if (empty($referrals)) {
eval("\$referral_rows = \"".$templates->get('member_no_referrals')."\";");
} else {
foreach($referrals as $referral)
{
// Format user name link
$username = htmlspecialchars_uni($referral['username']);
$username = format_name($username, $referral['usergroup'], $referral['displaygroup']);
$username = build_profile_link($username, $referral['uid']);

$regdate = my_date('normal', $referral['regdate']);

eval("\$referral_rows .= \"".$templates->get('member_referral_row')."\";");

$bg_color = alt_trow();
}
}

$plugins->run_hooks('xmlhttp_referrals_end');

eval("\$referrals = \"".$templates->get('member_referrals_popup', 1, 0)."\";");

// Send our headers and output.
header("Content-type: text/plain; charset={$charset}");
echo $referrals;

}

/**

}

/**