Vergleich usercp.php - 1.8.12 - 1.8.13

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 1521Zeile 1521
	{
$tids = implode(",", array_keys($subscriptions));
$readforums = array();

	{
$tids = implode(",", array_keys($subscriptions));
$readforums = array();

		



		// Build a forum cache.
$query = $db->query("
SELECT f.fid, fr.dateline AS lastread

		// Build a forum cache.
$query = $db->query("
SELECT f.fid, fr.dateline AS lastread

Zeile 1530Zeile 1530
			WHERE f.active != 0
ORDER BY pid, disporder
");

			WHERE f.active != 0
ORDER BY pid, disporder
");

		



		while($forum = $db->fetch_array($query))
{
$readforums[$forum['fid']] = $forum['lastread'];

		while($forum = $db->fetch_array($query))
{
$readforums[$forum['fid']] = $forum['lastread'];

Zeile 1635Zeile 1635
				if($thread['lastread'])
{
$lastread = $thread['lastread'];

				if($thread['lastread'])
{
$lastread = $thread['lastread'];

				}
else
{

				}
else
{

					$lastread = 1;
}
}

					$lastread = 1;
}
}

Zeile 1656Zeile 1656
			}

if($lastread && $lastread < $thread['lastpost'])

			}

if($lastread && $lastread < $thread['lastpost'])

			{

			{

				$folder .= "new";
$folder_label .= $lang->icon_new;
$new_class = "subject_new";

				$folder .= "new";
$folder_label .= $lang->icon_new;
$new_class = "subject_new";

Zeile 1674Zeile 1674
			{
$folder .= "hot";
$folder_label .= $lang->icon_hot;

			{
$folder .= "hot";
$folder_label .= $lang->icon_hot;

			}


			}


			if($thread['closed'] == 1)

			if($thread['closed'] == 1)

			{

			{

				$folder .= "lock";
$folder_label .= $lang->icon_lock;

				$folder .= "lock";
$folder_label .= $lang->icon_lock;

			}

$folder .= "folder";

			}

$folder .= "folder";


if($thread['visible'] == 0)


if($thread['visible'] == 0)

			{

			{

				$bgcolor = "trow_shaded";

				$bgcolor = "trow_shaded";

			}

			}


// Build last post info
$lastpostdate = my_date('relative', $thread['lastpost']);


// Build last post info
$lastpostdate = my_date('relative', $thread['lastpost']);

			$lastposter = htmlspecialchars_uni($thread['lastposter']);








			if(!$lastposteruid && !$thread['lastposter'])
{
$lastposter = htmlspecialchars_uni($lang->guest);
}
else
{
$lastposter = htmlspecialchars_uni($thread['lastposter']);
}

			$lastposteruid = $thread['lastposteruid'];

// Don't link to guest's profiles (they have no profile).

			$lastposteruid = $thread['lastposteruid'];

// Don't link to guest's profiles (they have no profile).

Zeile 1751Zeile 1758
		ORDER BY pid, disporder
");
$readforums = array();

		ORDER BY pid, disporder
");
$readforums = array();

	while($forum = $db->fetch_array($query))
{

	while($forum = $db->fetch_array($query))
{

		$readforums[$forum['fid']] = $forum['lastread'];
}


		$readforums[$forum['fid']] = $forum['lastread'];
}


Zeile 1794Zeile 1801
			$threads = my_number_format($forum['threads']);
}


			$threads = my_number_format($forum['threads']);
}


		if($forum['lastpost'] == 0 || $forum['lastposter'] == "")

		if($forum['lastpost'] == 0)

		{
eval("\$lastpost = \"".$templates->get("forumbit_depth2_forum_lastpost_never")."\";");
}

		{
eval("\$lastpost = \"".$templates->get("forumbit_depth2_forum_lastpost_never")."\";");
}

Zeile 1808Zeile 1815
			$forum['lastpostsubject'] = $parser->parse_badwords($forum['lastpostsubject']);
$lastpost_date = my_date('relative', $forum['lastpost']);
$lastposttid = $forum['lastposttid'];

			$forum['lastpostsubject'] = $parser->parse_badwords($forum['lastpostsubject']);
$lastpost_date = my_date('relative', $forum['lastpost']);
$lastposttid = $forum['lastposttid'];

			$lastposter = htmlspecialchars_uni($forum['lastposter']);
$lastpost_profilelink = build_profile_link($lastposter, $forum['lastposteruid']);















			if(!$forum['lastposteruid'] && !$forum['lastposter'])
{
$lastposter = htmlspecialchars_uni($lang->guest);
}
else
{
$lastposter = htmlspecialchars_uni($forum['lastposter']);
}
if($forum['lastposteruid'] == 0)
{
$lastpost_profilelink = $lastposter;
}
else
{
$lastpost_profilelink = build_profile_link($lastposter, $forum['lastposteruid']);
}

			$full_lastpost_subject = $lastpost_subject = htmlspecialchars_uni($forum['lastpostsubject']);
if(my_strlen($lastpost_subject) > 25)
{

			$full_lastpost_subject = $lastpost_subject = htmlspecialchars_uni($forum['lastpostsubject']);
if(my_strlen($lastpost_subject) > 25)
{

Zeile 1817Zeile 1838
			}
$lastpost_link = get_thread_link($forum['lastposttid'], 0, "lastpost");
eval("\$lastpost = \"".$templates->get("forumbit_depth2_forum_lastpost")."\";");

			}
$lastpost_link = get_thread_link($forum['lastposttid'], 0, "lastpost");
eval("\$lastpost = \"".$templates->get("forumbit_depth2_forum_lastpost")."\";");

		}


		}


		if($mybb->settings['showdescriptions'] == 0)
{
$forum['description'] = "";
}

		if($mybb->settings['showdescriptions'] == 0)
{
$forum['description'] = "";
}





		eval("\$forums .= \"".$templates->get("usercp_forumsubscriptions_forum")."\";");
}

if(!$forums)
{
eval("\$forums = \"".$templates->get("usercp_forumsubscriptions_none")."\";");

		eval("\$forums .= \"".$templates->get("usercp_forumsubscriptions_forum")."\";");
}

if(!$forums)
{
eval("\$forums = \"".$templates->get("usercp_forumsubscriptions_none")."\";");

	}


	}


	$plugins->run_hooks("usercp_forumsubscriptions_end");

eval("\$forumsubscriptions = \"".$templates->get("usercp_forumsubscriptions")."\";");

	$plugins->run_hooks("usercp_forumsubscriptions_end");

eval("\$forumsubscriptions = \"".$templates->get("usercp_forumsubscriptions")."\";");

Zeile 2439Zeile 2460
		foreach($users as $key => $username)
{
if(empty($username))

		foreach($users as $key => $username)
{
if(empty($username))

			{
unset($users[$key]);

			{
unset($users[$key]);

				continue;
}


				continue;
}


Zeile 2514Zeile 2535
				}

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

				}

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

				{
if($mybb->get_input('manage') != "ignored")
{

				{
if($mybb->get_input('manage') != "ignored")
{

						$error_message = $lang->users_already_sent_request;

						$error_message = $lang->users_already_sent_request;

					}

					}

					elseif($mybb->get_input('manage') == "ignored")
{
$error_message = $lang->users_already_sent_request_alt;

					elseif($mybb->get_input('manage') == "ignored")
{
$error_message = $lang->users_already_sent_request_alt;

					}

array_pop($users); // To maintain a proper count when we call count($users)
continue;
}


					}

array_pop($users); // To maintain a proper count when we call count($users)
continue;
}


				if(isset($requests_rec[$user['uid']]))
{
if($mybb->get_input('manage') != "ignored")

				if(isset($requests_rec[$user['uid']]))
{
if($mybb->get_input('manage') != "ignored")

Zeile 2551Zeile 2572
					$pm = array(
'subject' => 'buddyrequest_new_buddy',
'message' => 'buddyrequest_new_buddy_message',

					$pm = array(
'subject' => 'buddyrequest_new_buddy',
'message' => 'buddyrequest_new_buddy_message',

						'touid' => $user['uid'],
'receivepms' => (int)$user['buddyrequestspm'],
'language' => $user['language'],
'language_file' => 'usercp'

						'touid' => $user['uid'],
'receivepms' => (int)$user['buddyrequestspm'],
'language' => $user['language'],
'language_file' => 'usercp'

					);

send_pm($pm);

					);

send_pm($pm);

Zeile 2583Zeile 2604
				}
}
}

				}
}
}





		if($found_users < count($users))
{
if($error_message)

		if($found_users < count($users))
{
if($error_message)

Zeile 2592Zeile 2613
			}

$error_message .= $lang->invalid_user_selected;

			}

$error_message .= $lang->invalid_user_selected;

		}

		}


if(($adding_self != true || ($adding_self == true && count($users) > 0)) && ($error_message == "" || count($users) > 1))
{


if(($adding_self != true || ($adding_self == true && count($users) > 0)) && ($error_message == "" || count($users) > 1))
{

Zeile 2668Zeile 2689
				{
$new_list = my_substr($new_list, 0, my_strlen($new_list)-2);
}

				{
$new_list = my_substr($new_list, 0, my_strlen($new_list)-2);
}





				$user['buddylist'] = $db->escape_string($new_list);

				$user['buddylist'] = $db->escape_string($new_list);





				$db->update_query("users", array('buddylist' => $user['buddylist']), "uid='".(int)$user['uid']."'");

				$db->update_query("users", array('buddylist' => $user['buddylist']), "uid='".(int)$user['uid']."'");

			}


			}


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

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

Zeile 2697Zeile 2718
	if(my_substr($new_list, 0, 1) == ",")
{
$new_list = my_substr($new_list, 1);

	if(my_substr($new_list, 0, 1) == ",")
{
$new_list = my_substr($new_list, 1);

	}

	}

	if(my_substr($new_list, -1) == ",")
{
$new_list = my_substr($new_list, 0, my_strlen($new_list)-2);

	if(my_substr($new_list, -1) == ",")
{
$new_list = my_substr($new_list, 0, my_strlen($new_list)-2);

Zeile 2706Zeile 2727
	// And update
$user = array();
if($mybb->get_input('manage') == "ignored")

	// And update
$user = array();
if($mybb->get_input('manage') == "ignored")

	{

	{

		$user['ignorelist'] = $db->escape_string($new_list);
$mybb->user['ignorelist'] = $user['ignorelist'];
}
else

		$user['ignorelist'] = $db->escape_string($new_list);
$mybb->user['ignorelist'] = $user['ignorelist'];
}
else

	{

	{

		$user['buddylist'] = $db->escape_string($new_list);
$mybb->user['buddylist'] = $user['buddylist'];
}

		$user['buddylist'] = $db->escape_string($new_list);
$mybb->user['buddylist'] = $user['buddylist'];
}

Zeile 2730Zeile 2751
		else
{
$list = "buddy";

		else
{
$list = "buddy";

		}

		}


$message_js = '';
if($message)


$message_js = '';
if($message)

Zeile 2744Zeile 2765
		}

if($mybb->get_input('delete', MyBB::INPUT_INT))

		}

if($mybb->get_input('delete', MyBB::INPUT_INT))

		{

		{

			header("Content-type: text/javascript");
echo "$(\"#".$mybb->get_input('manage')."_".$mybb->get_input('delete', MyBB::INPUT_INT)."\").remove();\n";
if($new_list == "")

			header("Content-type: text/javascript");
echo "$(\"#".$mybb->get_input('manage')."_".$mybb->get_input('delete', MyBB::INPUT_INT)."\").remove();\n";
if($new_list == "")

Zeile 2867Zeile 2888
				{
$bgcolor = alt_trow();
$request['username'] = build_profile_link(htmlspecialchars_uni($request['username']), (int)$request['touid']);

				{
$bgcolor = alt_trow();
$request['username'] = build_profile_link(htmlspecialchars_uni($request['username']), (int)$request['touid']);

					$request['date'] = my_date($mybb->settings['dateformat'], $request['date'])." ".my_date($mybb->settings['timeformat'], $request['date']);

					$request['date'] = my_date('relative', $request['date']);

					eval("\$sent_rows .= \"".$templates->get("usercp_editlists_sent_request", 1, 0)."\";");
}


					eval("\$sent_rows .= \"".$templates->get("usercp_editlists_sent_request", 1, 0)."\";");
}


Zeile 2901Zeile 2922
	{
$bgcolor = alt_trow();
$request['username'] = build_profile_link(htmlspecialchars_uni($request['username']), (int)$request['uid']);

	{
$bgcolor = alt_trow();
$request['username'] = build_profile_link(htmlspecialchars_uni($request['username']), (int)$request['uid']);

		$request['date'] = my_date($mybb->settings['dateformat'], $request['date'])." ".my_date($mybb->settings['timeformat'], $request['date']);

		$request['date'] = my_date('relative', $request['date']);

		eval("\$received_rows .= \"".$templates->get("usercp_editlists_received_request")."\";");
}


		eval("\$received_rows .= \"".$templates->get("usercp_editlists_received_request")."\";");
}


Zeile 2923Zeile 2944
	{
$bgcolor = alt_trow();
$request['username'] = build_profile_link(htmlspecialchars_uni($request['username']), (int)$request['touid']);

	{
$bgcolor = alt_trow();
$request['username'] = build_profile_link(htmlspecialchars_uni($request['username']), (int)$request['touid']);

		$request['date'] = my_date($mybb->settings['dateformat'], $request['date'])." ".my_date($mybb->settings['timeformat'], $request['date']);

		$request['date'] = my_date('relative', $request['date']);

		eval("\$sent_rows .= \"".$templates->get("usercp_editlists_sent_request")."\";");
}


		eval("\$sent_rows .= \"".$templates->get("usercp_editlists_sent_request")."\";");
}


Zeile 3715Zeile 3736
				}
else
{

				}
else
{

					$expires = my_date('relative', $warning['expires']);

					$expires = nice_time($warning['expires']-TIME_NOW);

				}

$alt_bg = alt_trow();

				}

$alt_bg = alt_trow();

Zeile 3881Zeile 3902
						}

$lastpostdate = my_date('relative', $thread['lastpost']);

						}

$lastpostdate = my_date('relative', $thread['lastpost']);

						$lastposter = htmlspecialchars_uni($thread['lastposter']);

 
						$lastposteruid = $thread['lastposteruid'];

						$lastposteruid = $thread['lastposteruid'];

 
						if(!$lastposteruid && !$thread['lastposter'])
{
$lastposter = htmlspecialchars_uni($lang->guest);
}
else
{
$lastposter = htmlspecialchars_uni($thread['lastposter']);
}


if($lastposteruid == 0)
{


if($lastposteruid == 0)
{

Zeile 3903Zeile 3931
				}
eval("\$latest_subscribed = \"".$templates->get("usercp_latest_subscribed")."\";");
}

				}
eval("\$latest_subscribed = \"".$templates->get("usercp_latest_subscribed")."\";");
}

		}
}

		}
}


// User's Latest Threads



// User's Latest Threads


Zeile 3925Zeile 3953
	if(is_moderator() == true)
{
$visible = '';

	if(is_moderator() == true)
{
$visible = '';

	}

	}


$query = $db->query("
SELECT t.*, t.username AS threadusername, u.username


$query = $db->query("
SELECT t.*, t.username AS threadusername, u.username

Zeile 3945Zeile 3973
		if($thread['visible'] == 0 && is_moderator($thread['fid'], "canviewunapprove") === false)
{
continue;

		if($thread['visible'] == 0 && is_moderator($thread['fid'], "canviewunapprove") === false)
{
continue;

		}


		}


		$forumpermissions = $fpermissions[$thread['fid']];
if($forumpermissions['canview'] != 0 || $forumpermissions['canviewthreads'] != 0)
{

		$forumpermissions = $fpermissions[$thread['fid']];
if($forumpermissions['canview'] != 0 || $forumpermissions['canviewthreads'] != 0)
{

Zeile 3968Zeile 3996
			WHERE f.active != 0
ORDER BY pid, disporder
");

			WHERE f.active != 0
ORDER BY pid, disporder
");

		



		while($forum = $db->fetch_array($query))
{
$readforums[$forum['fid']] = $forum['lastread'];

		while($forum = $db->fetch_array($query))
{
$readforums[$forum['fid']] = $forum['lastread'];