Vergleich usercp2.php - 1.8.2 - 1.8.8

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 42Zeile 42
	}

// Is the currently logged in user a moderator of this forum?

	}

// Is the currently logged in user a moderator of this forum?

	if(is_moderator($thread['fid']))
{
$ismod = true;
}
else
{
$ismod = false;
}

	$ismod = is_moderator($thread['fid']);









// Make sure we are looking at a real thread here.
if(($thread['visible'] != 1 && $ismod == false) || ($thread['visible'] > 1 && $ismod == true))
{
error($lang->error_invalidthread);


// Make sure we are looking at a real thread here.
if(($thread['visible'] != 1 && $ismod == false) || ($thread['visible'] > 1 && $ismod == true))
{
error($lang->error_invalidthread);

	}


	}


	$forumpermissions = forum_permissions($thread['fid']);
if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0 || (isset($forumpermissions['canonlyviewownthreads']) && $forumpermissions['canonlyviewownthreads'] != 0 && $thread['uid'] != $mybb->user['uid']))
{

	$forumpermissions = forum_permissions($thread['fid']);
if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0 || (isset($forumpermissions['canonlyviewownthreads']) && $forumpermissions['canonlyviewownthreads'] != 0 && $thread['uid'] != $mybb->user['uid']))
{

Zeile 65Zeile 58

$plugins->run_hooks("usercp2_do_addsubscription");



$plugins->run_hooks("usercp2_do_addsubscription");


	add_subscribed_thread($thread['tid'], $mybb->get_input('notification', 1));


	add_subscribed_thread($thread['tid'], $mybb->get_input('notification', MyBB::INPUT_INT));


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

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

	{

	{

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

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

Zeile 81Zeile 74
{
if($mybb->get_input('type') == "forum")
{

{
if($mybb->get_input('type') == "forum")
{

		$forum = get_forum($mybb->get_input('fid', 1));

		$forum = get_forum($mybb->get_input('fid', MyBB::INPUT_INT));

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

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

Zeile 104Zeile 97
			$url = "index.php";
}
redirect($url, $lang->redirect_forumsubscriptionadded);

			$url = "index.php";
}
redirect($url, $lang->redirect_forumsubscriptionadded);

	}

	}

	else
{

	else
{

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

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

		if(!$thread)

		if(!$thread)

		{
error($lang->error_invalidthread);
}


		{
error($lang->error_invalidthread);
}


		// Is the currently logged in user a moderator of this forum?

		// Is the currently logged in user a moderator of this forum?

		if(is_moderator($thread['fid']))
{
$ismod = true;
}
else
{
$ismod = false;
}

		$ismod = is_moderator($thread['fid']);









// Make sure we are looking at a real thread here.
if(($thread['visible'] != 1 && $ismod == false) || ($thread['visible'] > 1 && $ismod == true))


// Make sure we are looking at a real thread here.
if(($thread['visible'] != 1 && $ismod == false) || ($thread['visible'] > 1 && $ismod == true))

Zeile 130Zeile 116
		}

add_breadcrumb($lang->nav_subthreads, "usercp.php?action=subscriptions");

		}

add_breadcrumb($lang->nav_subthreads, "usercp.php?action=subscriptions");

		add_breadcrumb($lang->nav_addsubscription);

		add_breadcrumb($lang->nav_addsubscription);


$forumpermissions = forum_permissions($thread['fid']);
if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0 || (isset($forumpermissions['canonlyviewownthreads']) && $forumpermissions['canonlyviewownthreads'] != 0 && $thread['uid'] != $mybb->user['uid']))


$forumpermissions = forum_permissions($thread['fid']);
if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0 || (isset($forumpermissions['canonlyviewownthreads']) && $forumpermissions['canonlyviewownthreads'] != 0 && $thread['uid'] != $mybb->user['uid']))

Zeile 174Zeile 160
{
if($mybb->get_input('type') == "forum")
{

{
if($mybb->get_input('type') == "forum")
{

		$forum = get_forum($mybb->get_input('fid', 1));

		$forum = get_forum($mybb->get_input('fid', MyBB::INPUT_INT));

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

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

Zeile 195Zeile 181
	}
else
{

	}
else
{

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

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

		if(!$thread)
{
error($lang->error_invalidthread);
}

// Is the currently logged in user a moderator of this forum?

		if(!$thread)
{
error($lang->error_invalidthread);
}

// Is the currently logged in user a moderator of this forum?

		if(is_moderator($thread['fid']))
{
$ismod = true;
}
else
{
$ismod = false;
}

		$ismod = is_moderator($thread['fid']);









// Make sure we are looking at a real thread here.
if(($thread['visible'] != 1 && $ismod == false) || ($thread['visible'] > 1 && $ismod == true))


// Make sure we are looking at a real thread here.
if(($thread['visible'] != 1 && $ismod == false) || ($thread['visible'] > 1 && $ismod == true))