Vergleich usercp2.php - 1.4.5 - 1.4.15

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * $Id: usercp2.php 4304 2009-01-02 01:11:56Z chris $

 * $Id: usercp2.php 5379 2011-02-21 11:06:42Z Tomm $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 21Zeile 21
{
error_no_permission();
}

{
error_no_permission();
}

 

// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);


$lang->load("usercp");


$lang->load("usercp");





usercp_menu();

usercp_menu();





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

if($mybb->input['action'] == "do_addsubscription")
{
if($mybb->input['type'] != "forum")

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

if($mybb->input['action'] == "do_addsubscription")
{
if($mybb->input['type'] != "forum")

	{
$thread = get_thread($mybb->input['tid']);
if(!$thread['tid'])
{
error($lang->error_invalidthread);
}
$forumpermissions = forum_permissions($thread['fid']);
if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0)
{

	{
$thread = get_thread($mybb->input['tid']);
if(!$thread['tid'])
{
error($lang->error_invalidthread);
}
$forumpermissions = forum_permissions($thread['fid']);
if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0)
{

			error_no_permission();
}
add_subscribed_thread($thread['tid'], $mybb->input['notification']);
if($mybb->input['referrer'])

			error_no_permission();
}
add_subscribed_thread($thread['tid'], $mybb->input['notification']);
if($mybb->input['referrer'])

		{

		{

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

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

		}

		}

		else
{
$url = get_thread_link($thread['tid']);

		else
{
$url = get_thread_link($thread['tid']);

Zeile 56Zeile 59
}

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

}

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

{

{

	if($mybb->input['type'] == "forum")
{
$forum = get_forum($mybb->input['fid']);
if(!$forum['fid'])

	if($mybb->input['type'] == "forum")
{
$forum = get_forum($mybb->input['fid']);
if(!$forum['fid'])

		{

		{

			error($lang->error_invalidforum);
}
$forumpermissions = forum_permissions($forum['fid']);
if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0)

			error($lang->error_invalidforum);
}
$forumpermissions = forum_permissions($forum['fid']);
if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0)

		{

		{

			error_no_permission();

			error_no_permission();

		}

		}

		add_subscribed_forum($forum['fid']);

		add_subscribed_forum($forum['fid']);

		if($server_http_referer)
{
$url = $server_http_referer;
}

		if($server_http_referer)
{
$url = $server_http_referer;
}

		else
{
$url = "index.php";

		else
{
$url = "index.php";

Zeile 108Zeile 111
		$lang->subscribe_to_thread = $lang->sprintf($lang->subscribe_to_thread, $thread['subject']);

if($mybb->user['subscriptionmethod'] == 1 || $mybb->user['subscriptionmethod'] == 0)

		$lang->subscribe_to_thread = $lang->sprintf($lang->subscribe_to_thread, $thread['subject']);

if($mybb->user['subscriptionmethod'] == 1 || $mybb->user['subscriptionmethod'] == 0)

		{

		{

			$notification_none_checked = "checked=\"checked\"";
}
else if($mybb->user['subscriptionmethod'] == 2)

			$notification_none_checked = "checked=\"checked\"";
}
else if($mybb->user['subscriptionmethod'] == 2)

Zeile 125Zeile 128
	{
$forum = get_forum($mybb->input['fid']);
if(!$forum['fid'])

	{
$forum = get_forum($mybb->input['fid']);
if(!$forum['fid'])

		{

		{

			error($lang->error_invalidforum);
}
remove_subscribed_forum($forum['fid']);

			error($lang->error_invalidforum);
}
remove_subscribed_forum($forum['fid']);

Zeile 159Zeile 162
	}
}
elseif($mybb->input['action'] == "removesubscriptions")

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

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


{	




	if($mybb->input['type'] == "forum")
{
$db->delete_query("forumsubscriptions", "uid='".$mybb->user['uid']."'");

	if($mybb->input['type'] == "forum")
{
$db->delete_query("forumsubscriptions", "uid='".$mybb->user['uid']."'");