Vergleich usercp.php - 1.8.8 - 1.8.15

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 20Zeile 20
$templatelist .= ",usercp_editsig_suspended,usercp_editsig,usercp_avatar_current,usercp_options_timezone_option,usercp_drafts,usercp_options_language,usercp_options_date_format,usercp_profile_website,usercp_latest_subscribed,usercp_warnings";
$templatelist .= ",usercp_avatar,usercp_editlists_userusercp_editlists,usercp_drafts_draft,usercp_usergroups_joingroup,usercp_attachments_none,usercp_avatar_upload,usercp_options_timezone,usercp_usergroups_joinable_usergroup_join";
$templatelist .= ",usercp_warnings_warning,usercp_nav_messenger_tracking,multipage,multipage_end,multipage_jump_page,multipage_nextpage,multipage_page,multipage_page_current,multipage_page_link_current,multipage_prevpage,multipage_start";

$templatelist .= ",usercp_editsig_suspended,usercp_editsig,usercp_avatar_current,usercp_options_timezone_option,usercp_drafts,usercp_options_language,usercp_options_date_format,usercp_profile_website,usercp_latest_subscribed,usercp_warnings";
$templatelist .= ",usercp_avatar,usercp_editlists_userusercp_editlists,usercp_drafts_draft,usercp_usergroups_joingroup,usercp_attachments_none,usercp_avatar_upload,usercp_options_timezone,usercp_usergroups_joinable_usergroup_join";
$templatelist .= ",usercp_warnings_warning,usercp_nav_messenger_tracking,multipage,multipage_end,multipage_jump_page,multipage_nextpage,multipage_page,multipage_page_current,multipage_page_link_current,multipage_prevpage,multipage_start";

$templatelist .= ",codebuttons,usercp_nav_messenger_compose,usercp_options_language_option,usercp_editlists,usercp_profile_contact_fields_field,usercp_latest_subscribed_threads,usercp_profile_contact_fields,usercp_profile_day";

$templatelist .= ",codebuttons,usercp_nav_messenger_compose,usercp_options_language_option,usercp_editlists,usercp_profile_contact_fields_field,usercp_latest_subscribed_threads,usercp_profile_contact_fields,usercp_profile_day,usercp_nav_home";

$templatelist .= ",usercp_profile_profilefields_select_option,usercp_profile_profilefields_multiselect,usercp_profile_profilefields_select,usercp_profile_profilefields_textarea,usercp_profile_profilefields_radio,usercp_profile_profilefields_checkbox";
$templatelist .= ",usercp_options_tppselect_option,usercp_options_pppselect_option,forumbit_depth2_forum_lastpost_never,forumbit_depth2_forum_lastpost_hidden,usercp_avatar_auto_resize_auto,usercp_avatar_auto_resize_user,usercp_options";

$templatelist .= ",usercp_profile_profilefields_select_option,usercp_profile_profilefields_multiselect,usercp_profile_profilefields_select,usercp_profile_profilefields_textarea,usercp_profile_profilefields_radio,usercp_profile_profilefields_checkbox";
$templatelist .= ",usercp_options_tppselect_option,usercp_options_pppselect_option,forumbit_depth2_forum_lastpost_never,forumbit_depth2_forum_lastpost_hidden,usercp_avatar_auto_resize_auto,usercp_avatar_auto_resize_user,usercp_options";

$templatelist .= ",usercp_editlists_no_buddies,usercp_editlists_no_ignored,usercp_editlists_no_requests,usercp_editlists_received_requests,usercp_editlists_sent_requests,usercp_drafts_draft_thread,usercp_drafts_draft_forum";
$templatelist .= ",usercp_usergroups_leader_usergroup_memberlist,usercp_usergroups_leader_usergroup_moderaterequests,usercp_usergroups_memberof_usergroup_leaveprimary,usercp_usergroups_memberof_usergroup_display,usercp_email";

$templatelist .= ",usercp_editlists_no_buddies,usercp_editlists_no_ignored,usercp_editlists_no_requests,usercp_editlists_received_requests,usercp_editlists_sent_requests,usercp_drafts_draft_thread,usercp_drafts_draft_forum,usercp_editlists_user";
$templatelist .= ",usercp_usergroups_leader_usergroup_memberlist,usercp_usergroups_leader_usergroup_moderaterequests,usercp_usergroups_memberof_usergroup_leaveprimary,usercp_usergroups_memberof_usergroup_display,usercp_email,usercp_options_pms";

$templatelist .= ",usercp_usergroups_memberof_usergroup_leaveleader,usercp_usergroups_memberof_usergroup_leaveother,usercp_usergroups_memberof_usergroup_leave,usercp_usergroups_joinable_usergroup_description,usercp_options_time_format";

$templatelist .= ",usercp_usergroups_memberof_usergroup_leaveleader,usercp_usergroups_memberof_usergroup_leaveother,usercp_usergroups_memberof_usergroup_leave,usercp_usergroups_joinable_usergroup_description,usercp_options_time_format";

$templatelist .= ",usercp_editlists_sent_request,usercp_editlists_received_request,usercp_drafts_none,usercp_usergroups_memberof_usergroup_setdisplay,usercp_usergroups_memberof_usergroup_description,usercp_editlists_user";

$templatelist .= ",usercp_editlists_sent_request,usercp_editlists_received_request,usercp_drafts_none,usercp_usergroups_memberof_usergroup_setdisplay,usercp_usergroups_memberof_usergroup_description,usercp_options_quick_reply";


require_once "./global.php";
require_once MYBB_ROOT."inc/functions_post.php";


require_once "./global.php";
require_once MYBB_ROOT."inc/functions_post.php";

Zeile 70Zeile 70
	if(!$userhandler->verify_signature())
{
$error = inline_error($userhandler->get_friendly_errors());

	if(!$userhandler->verify_signature())
{
$error = inline_error($userhandler->get_friendly_errors());

 
	}

if(isset($error) || !empty($mybb->input['preview']))
{

		$mybb->input['action'] = "editsig";
}
}

		$mybb->input['action'] = "editsig";
}
}

Zeile 253Zeile 257
	if(!$userhandler->validate_user())
{
$errors = $userhandler->get_friendly_errors();

	if(!$userhandler->validate_user())
{
$errors = $userhandler->get_friendly_errors();

 
		$raw_errors = $userhandler->get_errors();





		// Set allowed value otherwise select options disappear
if(in_array($lang->userdata_invalid_birthday_privacy, $errors))

		// Set to stored value if invalid
if(array_key_exists("invalid_birthday_privacy", $raw_errors))

		{

		{

			$mybb->input['birthdayprivacy'] = 'none';

			$mybb->input['birthdayprivacy'] = $mybb->user['birthdayprivacy'];

		}

$errors = inline_error($errors);

		}

$errors = inline_error($errors);

Zeile 653Zeile 658
			$options = "";
$expoptions = "";
$useropts = "";

			$options = "";
$expoptions = "";
$useropts = "";

			$seloptions = "";

			$seloptions = array();

		}
}
if($customfields)

		}
}
if($customfields)

Zeile 1037Zeile 1042

$date_format_options = $dateformat = '';
foreach($date_formats as $key => $format)


$date_format_options = $dateformat = '';
foreach($date_formats as $key => $format)

	{

	{

		$selected = '';
if(isset($user['dateformat']) && $user['dateformat'] == $key)

		$selected = '';
if(isset($user['dateformat']) && $user['dateformat'] == $key)

		{
$selected = " selected=\"selected\"";

		{
$selected = " selected=\"selected\"";

		}

$dateformat = my_date($format, TIME_NOW, "", 0);

		}

$dateformat = my_date($format, TIME_NOW, "", 0);

Zeile 1056Zeile 1061
		{
$selected = " selected=\"selected\"";
}

		{
$selected = " selected=\"selected\"";
}





		$timeformat = my_date($format, TIME_NOW, "", 0);
eval("\$time_format_options .= \"".$templates->get("usercp_options_time_format")."\";");

		$timeformat = my_date($format, TIME_NOW, "", 0);
eval("\$time_format_options .= \"".$templates->get("usercp_options_time_format")."\";");

	}

	}


$tzselect = build_timezone_select("timezoneoffset", $mybb->user['timezone'], true);



$tzselect = build_timezone_select("timezoneoffset", $mybb->user['timezone'], true);


Zeile 1067Zeile 1072
	if($mybb->settings['allowbuddyonly'] == 1)
{
eval("\$pms_from_buddys = \"".$templates->get("usercp_options_pms_from_buddys")."\";");

	if($mybb->settings['allowbuddyonly'] == 1)
{
eval("\$pms_from_buddys = \"".$templates->get("usercp_options_pms_from_buddys")."\";");

 
	}

$pms = '';
if($mybb->settings['enablepms'] != 0 && $mybb->usergroup['canusepms'] == 1)
{
eval("\$pms = \"".$templates->get("usercp_options_pms")."\";");
}

$quick_reply = '';
if($mybb->settings['quickreply'] == 1)
{
eval("\$quick_reply = \"".$templates->get("usercp_options_quick_reply")."\";");

	}

$threadview = array('linear' => '', 'threaded' => '');

	}

$threadview = array('linear' => '', 'threaded' => '');

Zeile 1151Zeile 1168
	$errors = array();

$plugins->run_hooks("usercp_do_email_start");

	$errors = array();

$plugins->run_hooks("usercp_do_email_start");

	if(validate_password_from_uid($mybb->user['uid'], $mybb->get_input('password')) == false)
{
$errors[] = $lang->error_invalidpassword;
}
else
{

	if(validate_password_from_uid($mybb->user['uid'], $mybb->get_input('password')) == false)
{
$errors[] = $lang->error_invalidpassword;
}
else
{

		// Set up user handler.
require_once MYBB_ROOT."inc/datahandlers/user.php";
$userhandler = new UserDataHandler("update");

		// Set up user handler.
require_once MYBB_ROOT."inc/datahandlers/user.php";
$userhandler = new UserDataHandler("update");

Zeile 1272Zeile 1289
		else
{
$userhandler->update_user();

		else
{
$userhandler->update_user();

			my_setcookie("mybbuser", $mybb->user['uid']."_".$userhandler->data['loginkey']);

			my_setcookie("mybbuser", $mybb->user['uid']."_".$userhandler->data['loginkey'], null, true);


// Notify the user by email that their password has been changed
$mail_message = $lang->sprintf($lang->email_changepassword, $mybb->user['username'], $mybb->user['email'], $mybb->settings['bbname'], $mybb->settings['bburl']);


// Notify the user by email that their password has been changed
$mail_message = $lang->sprintf($lang->email_changepassword, $mybb->user['username'], $mybb->user['email'], $mybb->settings['bbname'], $mybb->settings['bburl']);

Zeile 1335Zeile 1352
			$userhandler->update_user();
$plugins->run_hooks("usercp_do_changename_end");
redirect("usercp.php?action=changename", $lang->redirect_namechanged);

			$userhandler->update_user();
$plugins->run_hooks("usercp_do_changename_end");
redirect("usercp.php?action=changename", $lang->redirect_namechanged);





		}

		}

	}

	}

	if(count($errors) > 0)
{
$errors = inline_error($errors);
$mybb->input['action'] = "changename";

	if(count($errors) > 0)
{
$errors = inline_error($errors);
$mybb->input['action'] = "changename";

	}
}

	}
}


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


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

Zeile 1358Zeile 1375
	eval("\$changename = \"".$templates->get("usercp_changename")."\";");
output_page($changename);
}

	eval("\$changename = \"".$templates->get("usercp_changename")."\";");
output_page($changename);
}





if($mybb->input['action'] == "do_subscriptions")
{
// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));

$plugins->run_hooks("usercp_do_subscriptions_start");

if($mybb->input['action'] == "do_subscriptions")
{
// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));

$plugins->run_hooks("usercp_do_subscriptions_start");





	if(!isset($mybb->input['check']) || !is_array($mybb->input['check']))
{
error($lang->no_subscriptions_selected);

	if(!isset($mybb->input['check']) || !is_array($mybb->input['check']))
{
error($lang->no_subscriptions_selected);

Zeile 1394Zeile 1411
		else if($mybb->get_input('do') == "pm_notification")
{
$new_notification = 2;

		else if($mybb->get_input('do') == "pm_notification")
{
$new_notification = 2;

		}

		}


// Update
$update_array = array("notification" => $new_notification);


// Update
$update_array = array("notification" => $new_notification);

Zeile 1505Zeile 1522
	{
$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 1514Zeile 1531
			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 1675Zeile 1692

// 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'];

			$lastposteruid = $thread['lastposteruid'];





			// Don't link to guest's profiles (they have no profile).
if($lastposteruid == 0)
{

			// Don't link to guest's profiles (they have no profile).
if($lastposteruid == 0)
{

Zeile 1690Zeile 1714

$thread['replies'] = my_number_format($thread['replies']);
$thread['views'] = my_number_format($thread['views']);


$thread['replies'] = my_number_format($thread['replies']);
$thread['views'] = my_number_format($thread['views']);





			// What kind of notification type do we have here?
switch($thread['notification'])
{

			// What kind of notification type do we have here?
switch($thread['notification'])
{

Zeile 1733Zeile 1757
		LEFT JOIN ".TABLE_PREFIX."forumsread fr ON (fr.fid=f.fid AND fr.uid='{$mybb->user['uid']}')
WHERE f.active != 0
ORDER BY pid, disporder

		LEFT JOIN ".TABLE_PREFIX."forumsread fr ON (fr.fid=f.fid AND fr.uid='{$mybb->user['uid']}')
WHERE f.active != 0
ORDER BY pid, disporder

	");

	");

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

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

Zeile 1762Zeile 1786
		if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0)
{
continue;

		if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0)
{
continue;

		}

		}


$lightbulb = get_forum_lightbulb(array('open' => $forum['open'], 'lastread' => $forum['lastread']), array('lastpost' => $forum['lastpost']));
$folder = $lightbulb['folder'];

if(isset($forumpermissions['canonlyviewownthreads']) && $forumpermissions['canonlyviewownthreads'] != 0)


$lightbulb = get_forum_lightbulb(array('open' => $forum['open'], 'lastread' => $forum['lastread']), array('lastpost' => $forum['lastpost']));
$folder = $lightbulb['folder'];

if(isset($forumpermissions['canonlyviewownthreads']) && $forumpermissions['canonlyviewownthreads'] != 0)

		{

		{

			$posts = '-';
$threads = '-';
}

			$posts = '-';
$threads = '-';
}

Zeile 1776Zeile 1800
		{
$posts = my_number_format($forum['posts']);
$threads = my_number_format($forum['threads']);

		{
$posts = my_number_format($forum['posts']);
$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")."\";");

		}

		}

		// Hide last post
elseif(isset($forumpermissions['canonlyviewownthreads']) && $forumpermissions['canonlyviewownthreads'] != 0 && $forum['lastposteruid'] != $mybb->user['uid'])

		// Hide last post
elseif(isset($forumpermissions['canonlyviewownthreads']) && $forumpermissions['canonlyviewownthreads'] != 0 && $forum['lastposteruid'] != $mybb->user['uid'])

		{

		{

			eval("\$lastpost = \"".$templates->get("forumbit_depth2_forum_lastpost_hidden")."\";");
}
else

			eval("\$lastpost = \"".$templates->get("forumbit_depth2_forum_lastpost_hidden")."\";");
}
else

Zeile 1792Zeile 1816
			$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 2025Zeile 2063
			$db->update_query("users", $updated_avatar, "uid='".$mybb->user['uid']."'");
}
}

			$db->update_query("users", $updated_avatar, "uid='".$mybb->user['uid']."'");
}
}

	else // remote avatar

	elseif($mybb->settings['allowremoteavatars']) // remote avatar

	{
$mybb->input['avatarurl'] = trim($mybb->get_input('avatarurl'));
if(validate_email_format($mybb->input['avatarurl']) != false)

	{
$mybb->input['avatarurl'] = trim($mybb->get_input('avatarurl'));
if(validate_email_format($mybb->input['avatarurl']) != false)

Zeile 2125Zeile 2163
				remove_avatars($mybb->user['uid']);
}
}

				remove_avatars($mybb->user['uid']);
}
}

 
	}
else // remote avatar, but remote avatars are not allowed
{
$avatar_error = $lang->error_remote_avatar_not_allowed;

	}

if(empty($avatar_error))
{
$plugins->run_hooks("usercp_do_avatar_end");
redirect("usercp.php?action=avatar", $lang->redirect_avatarupdated);

	}

if(empty($avatar_error))
{
$plugins->run_hooks("usercp_do_avatar_end");
redirect("usercp.php?action=avatar", $lang->redirect_avatarupdated);

	}

	}

	else
{
$mybb->input['action'] = "avatar";
$avatar_error = inline_error($avatar_error);

	else
{
$mybb->input['action'] = "avatar";
$avatar_error = inline_error($avatar_error);

	}

	}

}

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

}

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





	$avatarmsg = $avatarurl = '';

if($mybb->user['avatartype'] == "upload" || stristr($mybb->user['avatar'], $mybb->settings['avataruploadpath']))

	$avatarmsg = $avatarurl = '';

if($mybb->user['avatartype'] == "upload" || stristr($mybb->user['avatar'], $mybb->settings['avataruploadpath']))

Zeile 2162Zeile 2204
	{
list($maxwidth, $maxheight) = explode("x", my_strtolower($mybb->settings['maxavatardims']));
$lang->avatar_note .= "<br />".$lang->sprintf($lang->avatar_note_dimensions, $maxwidth, $maxheight);

	{
list($maxwidth, $maxheight) = explode("x", my_strtolower($mybb->settings['maxavatardims']));
$lang->avatar_note .= "<br />".$lang->sprintf($lang->avatar_note_dimensions, $maxwidth, $maxheight);

	}


	}


	if($mybb->settings['avatarsize'])
{
$maxsize = get_friendly_size($mybb->settings['avatarsize']*1024);
$lang->avatar_note .= "<br />".$lang->sprintf($lang->avatar_note_size, $maxsize);
}

	if($mybb->settings['avatarsize'])
{
$maxsize = get_friendly_size($mybb->settings['avatarsize']*1024);
$lang->avatar_note .= "<br />".$lang->sprintf($lang->avatar_note_size, $maxsize);
}

 

$plugins->run_hooks("usercp_avatar_intermediate");


$auto_resize = '';
if($mybb->settings['avatarresizing'] == "auto")


$auto_resize = '';
if($mybb->settings['avatarresizing'] == "auto")

Zeile 2184Zeile 2228
	if($mybb->usergroup['canuploadavatars'] == 1)
{
eval("\$avatarupload = \"".$templates->get("usercp_avatar_upload")."\";");

	if($mybb->usergroup['canuploadavatars'] == 1)
{
eval("\$avatarupload = \"".$templates->get("usercp_avatar_upload")."\";");

 
	}

$avatar_remote = '';
if($mybb->settings['allowremoteavatars'] == 1)
{
eval("\$avatar_remote = \"".$templates->get("usercp_avatar_remote")."\";");

	}

$removeavatar = '';
if(!empty($mybb->user['avatar']))

	}

$removeavatar = '';
if(!empty($mybb->user['avatar']))

	{

	{

		eval("\$removeavatar = \"".$templates->get("usercp_avatar_remove")."\";");

		eval("\$removeavatar = \"".$templates->get("usercp_avatar_remove")."\";");

	}

$plugins->run_hooks("usercp_avatar_end");


	}

$plugins->run_hooks("usercp_avatar_end");


	if(!isset($avatar_error))
{
$avatar_error = '';

	if(!isset($avatar_error))
{
$avatar_error = '';

	}


	}


	eval("\$avatar = \"".$templates->get("usercp_avatar")."\";");
output_page($avatar);
}

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

	eval("\$avatar = \"".$templates->get("usercp_avatar")."\";");
output_page($avatar);
}

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

{
// 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 touid='.(int)$mybb->user['uid']);
$request = $db->fetch_array($query);
if(empty($request))
{
error($lang->invalid_request);
}

$plugins->run_hooks("usercp_acceptrequest_start");


{
// 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 touid='.(int)$mybb->user['uid']);
$request = $db->fetch_array($query);
if(empty($request))
{
error($lang->invalid_request);
}

$plugins->run_hooks("usercp_acceptrequest_start");


	$user = get_user($request['uid']);
if(!empty($user))
{
// We want to add us to this user's buddy list
if($user['buddylist'] != '')

	$user = get_user($request['uid']);
if(!empty($user))
{
// We want to add us to this user's buddy list
if($user['buddylist'] != '')

		{

		{

			$user['buddylist'] = explode(',', $user['buddylist']);
}
else
{
$user['buddylist'] = array();

			$user['buddylist'] = explode(',', $user['buddylist']);
}
else
{
$user['buddylist'] = array();

		}

		}


$user['buddylist'][] = (int)$mybb->user['uid'];



$user['buddylist'][] = (int)$mybb->user['uid'];


Zeile 2262Zeile 2312
		else
{
$mybb->user['buddylist'] = array();

		else
{
$mybb->user['buddylist'] = array();

		}

		}


$mybb->user['buddylist'][] = (int)$request['uid'];



$mybb->user['buddylist'][] = (int)$request['uid'];


Zeile 2354Zeile 2404
	$plugins->run_hooks("usercp_cancelrequest_start");

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

	$plugins->run_hooks("usercp_cancelrequest_start");

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





	$plugins->run_hooks("usercp_cancelrequest_end");

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

	$plugins->run_hooks("usercp_cancelrequest_end");

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

Zeile 2490Zeile 2540
					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;

					}

					}

					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;

Zeile 2839Zeile 2889
				{
$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 2873Zeile 2923
	{
$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 2895Zeile 2945
	{
$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 3455Zeile 3505
	");

$bandwidth = $totaldownloads = 0;

	");

$bandwidth = $totaldownloads = 0;

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

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

		if($attachment['dateline'] && $attachment['tid'])
{
$attachment['subject'] = htmlspecialchars_uni($parser->parse_badwords($attachment['subject']));

		if($attachment['dateline'] && $attachment['tid'])
{
$attachment['subject'] = htmlspecialchars_uni($parser->parse_badwords($attachment['subject']));

Zeile 3495Zeile 3545
		$percent = round(($totalusage/($mybb->usergroup['attachquota']*1024))*100)."%";
$attachquota = get_friendly_size($mybb->usergroup['attachquota']*1024);
$usagenote = $lang->sprintf($lang->attachments_usage_quota, $friendlyusage, $attachquota, $percent, $totalattachments);

		$percent = round(($totalusage/($mybb->usergroup['attachquota']*1024))*100)."%";
$attachquota = get_friendly_size($mybb->usergroup['attachquota']*1024);
$usagenote = $lang->sprintf($lang->attachments_usage_quota, $friendlyusage, $attachquota, $percent, $totalattachments);

	}

	}

	else
{
$percent = $lang->unlimited;
$attachquota = $lang->unlimited;
$usagenote = $lang->sprintf($lang->attachments_usage, $friendlyusage, $totalattachments);

	else
{
$percent = $lang->unlimited;
$attachquota = $lang->unlimited;
$usagenote = $lang->sprintf($lang->attachments_usage, $friendlyusage, $totalattachments);

	}


	}


	$multipage = multipage($totalattachments, $perpage, $page, "usercp.php?action=attachments");
$bandwidth = get_friendly_size($bandwidth);


	$multipage = multipage($totalattachments, $perpage, $page, "usercp.php?action=attachments");
$bandwidth = get_friendly_size($bandwidth);


Zeile 3516Zeile 3566

eval("\$manageattachments = \"".$templates->get("usercp_attachments")."\";");
output_page($manageattachments);


eval("\$manageattachments = \"".$templates->get("usercp_attachments")."\";");
output_page($manageattachments);

}


}


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

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

Zeile 3687Zeile 3737
				}
else
{

				}
else
{

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

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

				}

$alt_bg = alt_trow();

				}

$alt_bg = alt_trow();

Zeile 3696Zeile 3746
			if($warnings)
{
eval("\$latest_warnings = \"".$templates->get("usercp_warnings")."\";");

			if($warnings)
{
eval("\$latest_warnings = \"".$templates->get("usercp_warnings")."\";");

			}
}
}

			}
}
}


// Format username
$username = format_name(htmlspecialchars_uni($mybb->user['username']), $mybb->user['usergroup'], $mybb->user['displaygroup']);


// Format username
$username = format_name(htmlspecialchars_uni($mybb->user['username']), $mybb->user['usergroup'], $mybb->user['displaygroup']);

Zeile 3818Zeile 3868
							$icon['path'] = htmlspecialchars_uni($icon['path']);
$icon['name'] = htmlspecialchars_uni($icon['name']);
eval("\$icon = \"".$templates->get("usercp_subscriptions_thread_icon")."\";");

							$icon['path'] = htmlspecialchars_uni($icon['path']);
$icon['name'] = htmlspecialchars_uni($icon['name']);
eval("\$icon = \"".$templates->get("usercp_subscriptions_thread_icon")."\";");

						}

						}

						else
{
$icon = "&nbsp;";

						else
{
$icon = "&nbsp;";

Zeile 3848Zeile 3898
						$folder .= "folder";

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

						$folder .= "folder";

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

						{

						{

							$bgcolor = "trow_shaded";

							$bgcolor = "trow_shaded";

						}


						}


						$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)

						{

						{

							$lastposterlink = $lastposter;

							$lastposterlink = $lastposter;

						}

						}

						else
{
$lastposterlink = build_profile_link($lastposter, $lastposteruid);
}

						else
{
$lastposterlink = build_profile_link($lastposter, $lastposteruid);
}





						$thread['replies'] = my_number_format($thread['replies']);
$thread['views'] = my_number_format($thread['views']);
$thread['username'] = htmlspecialchars_uni($thread['username']);

						$thread['replies'] = my_number_format($thread['replies']);
$thread['views'] = my_number_format($thread['views']);
$thread['username'] = htmlspecialchars_uni($thread['username']);

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

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

		}
}

// User's Latest Threads


		}
}

// User's Latest Threads


	// Get unviewable forums
$f_perm_sql = '';
$unviewable_forums = get_unviewable_forums();

	// Get unviewable forums
$f_perm_sql = '';
$unviewable_forums = get_unviewable_forums();

Zeile 3887Zeile 3944
	if($unviewable_forums)
{
$f_perm_sql = " AND t.fid NOT IN ($unviewable_forums)";

	if($unviewable_forums)
{
$f_perm_sql = " AND t.fid NOT IN ($unviewable_forums)";

	}

	}

	if($inactiveforums)
{
$f_perm_sql .= " AND t.fid NOT IN ($inactiveforums)";

	if($inactiveforums)
{
$f_perm_sql .= " AND t.fid NOT IN ($inactiveforums)";

Zeile 3917Zeile 3974
		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 3940Zeile 3997
			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'];