Vergleich private.php - 1.8.20 - 1.8.33

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 40Zeile 40
if($mybb->user['uid'] == '/' || $mybb->user['uid'] == 0 || $mybb->usergroup['canusepms'] == 0)
{
error_no_permission();

if($mybb->user['uid'] == '/' || $mybb->user['uid'] == 0 || $mybb->usergroup['canusepms'] == 0)
{
error_no_permission();

}

$update = false;
if(!$mybb->user['pmfolders'])
{
$update = true;
$mybb->user['pmfolders'] = "0**$%%$1**$%%$2**$%%$3**$%%$4**";
}
elseif ((int)my_substr($mybb->user['pmfolders'], 0, 1) != 0)
{
// Old folder structure. Need to update
// Since MyBB 1.8.20 fid[0] represents 'Inbox' and fid[1] represents 'Unread'
$update = true;
$mybb->user['pmfolders'] = '0'. ltrim(str_replace("$%%$2**", "$%%$1**$%%$2**", $mybb->user['pmfolders']), '1');
}

// Folder structure update required?
if($update)
{
$sql_array = array(
"pmfolders" => $mybb->user['pmfolders']
);
$db->update_query("users", $sql_array, "uid = ".$mybb->user['uid']);

 
}

$mybb->input['fid'] = $mybb->get_input('fid', MyBB::INPUT_INT);


}

$mybb->input['fid'] = $mybb->get_input('fid', MyBB::INPUT_INT);


$folder_id = $folder_name = '';

$folder_id = $folder_name = $folderjump_folder = $folderoplist_folder = $foldersearch_folder ='';


$foldernames = array();
$foldersexploded = explode("$%%$", $mybb->user['pmfolders']);


$foldernames = array();
$foldersexploded = explode("$%%$", $mybb->user['pmfolders']);

Zeile 75Zeile 52
{
$folderinfo = explode("**", $folders, 2);
if($mybb->input['fid'] == $folderinfo[0])

{
$folderinfo = explode("**", $folders, 2);
if($mybb->input['fid'] == $folderinfo[0])

	{

	{

		$sel = ' selected="selected"';
}
else

		$sel = ' selected="selected"';
}
else

Zeile 84Zeile 61
	}
$folderinfo[1] = get_pm_folder_name($folderinfo[0], $folderinfo[1]);
$foldernames[$folderinfo[0]] = $folderinfo[1];

	}
$folderinfo[1] = get_pm_folder_name($folderinfo[0], $folderinfo[1]);
$foldernames[$folderinfo[0]] = $folderinfo[1];





	$folder_id = $folderinfo[0];
$folder_name = $folderinfo[1];

	$folder_id = $folderinfo[0];
$folder_name = $folderinfo[1];





	eval("\$folderjump_folder .= \"".$templates->get("private_jump_folders_folder")."\";");

	eval("\$folderjump_folder .= \"".$templates->get("private_jump_folders_folder")."\";");

	eval("\$folderoplist_folder .= \"".$templates->get("private_jump_folders_folder")."\";");
eval("\$foldersearch_folder .= \"".$templates->get("private_jump_folders_folder")."\";");











// Manipulate search folder selection & move selector to omit "Unread"
if($folder_id != 1)
{
if($folder_id == 0)
{
$folder_id = 1;
}
eval("\$folderoplist_folder .= \"".$templates->get("private_jump_folders_folder")."\";");
eval("\$foldersearch_folder .= \"".$templates->get("private_jump_folders_folder")."\";");
}

}

$from_fid = $mybb->input['fid'];

}

$from_fid = $mybb->input['fid'];

Zeile 98Zeile 84
eval("\$folderjump = \"".$templates->get("private_jump_folders")."\";");
eval("\$folderoplist = \"".$templates->get("private_move")."\";");
eval("\$foldersearch = \"".$templates->get("private_advanced_search_folders")."\";");

eval("\$folderjump = \"".$templates->get("private_jump_folders")."\";");
eval("\$folderoplist = \"".$templates->get("private_move")."\";");
eval("\$foldersearch = \"".$templates->get("private_advanced_search_folders")."\";");


usercp_menu();


usercp_menu();


$plugins->run_hooks("private_start");

// Make navigation
add_breadcrumb($lang->nav_pms, "private.php");


$plugins->run_hooks("private_start");

// Make navigation
add_breadcrumb($lang->nav_pms, "private.php");





$mybb->input['action'] = $mybb->get_input('action');
switch($mybb->input['action'])
{

$mybb->input['action'] = $mybb->get_input('action');
switch($mybb->input['action'])
{

Zeile 114Zeile 100
		break;
case "tracking":
add_breadcrumb($lang->nav_tracking);

		break;
case "tracking":
add_breadcrumb($lang->nav_tracking);

		break;

		break;

	case "folders":
add_breadcrumb($lang->nav_folders);
break;

	case "folders":
add_breadcrumb($lang->nav_folders);
break;

Zeile 135Zeile 121
if(!empty($mybb->input['preview']))
{
$mybb->input['action'] = "send";

if(!empty($mybb->input['preview']))
{
$mybb->input['action'] = "send";

}

}


if(($mybb->input['action'] == "do_search" || $mybb->input['action'] == "do_stuff" && ($mybb->get_input('quick_search') || !$mybb->get_input('hop') && !$mybb->get_input('moveto') && !$mybb->get_input('delete'))) && $mybb->request_method == "post")
{


if(($mybb->input['action'] == "do_search" || $mybb->input['action'] == "do_stuff" && ($mybb->get_input('quick_search') || !$mybb->get_input('hop') && !$mybb->get_input('moveto') && !$mybb->get_input('delete'))) && $mybb->request_method == "post")
{

Zeile 172Zeile 158
				$lang->error_searchflooding = $lang->sprintf($lang->error_searchflooding, $mybb->settings['searchfloodtime'], $remaining_time);
}
error($lang->error_searchflooding);

				$lang->error_searchflooding = $lang->sprintf($lang->error_searchflooding, $mybb->settings['searchfloodtime'], $remaining_time);
}
error($lang->error_searchflooding);

		}

		}

	}

if($mybb->get_input('subject', MyBB::INPUT_INT) != 1 && $mybb->get_input('message', MyBB::INPUT_INT) != 1)

	}

if($mybb->get_input('subject', MyBB::INPUT_INT) != 1 && $mybb->get_input('message', MyBB::INPUT_INT) != 1)

Zeile 243Zeile 229
	else
{
$sortorder = "desc";

	else
{
$sortorder = "desc";

	}


	}


	$plugins->run_hooks("private_do_search_end");
redirect("private.php?action=results&sid=".$sid."&sortby=".$sortby."&order=".$sortorder, $lang->redirect_searchresults);
}

	$plugins->run_hooks("private_do_search_end");
redirect("private.php?action=results&sid=".$sid."&sortby=".$sortby."&order=".$sortorder, $lang->redirect_searchresults);
}

Zeile 256Zeile 242
	$search = $db->fetch_array($query);

if(!$search)

	$search = $db->fetch_array($query);

if(!$search)

	{

	{

		error($lang->error_invalidsearch);

		error($lang->error_invalidsearch);

	}

$plugins->run_hooks("private_results_start");


	}

$plugins->run_hooks("private_results_start");


	// Decide on our sorting fields and sorting order.
$order = my_strtolower($mybb->get_input('order'));
$sortby = my_strtolower($mybb->get_input('sortby'));

	// Decide on our sorting fields and sorting order.
$order = my_strtolower($mybb->get_input('order'));
$sortby = my_strtolower($mybb->get_input('sortby'));

Zeile 280Zeile 266
	else
{
$sortby = $query_sortby = "dateline";

	else
{
$sortby = $query_sortby = "dateline";

	}


	}


	if($order != "asc")
{
$order = "desc";

	if($order != "asc")
{
$order = "desc";

Zeile 341Zeile 327
	while($row = $db->fetch_array($users_query))
{
$recipients = my_unserialize($row['recipients']);

	while($row = $db->fetch_array($users_query))
{
$recipients = my_unserialize($row['recipients']);

		if(is_array($recipients['to']) && count($recipients['to']))

		if(isset($recipients['to']) && is_array($recipients['to']) && count($recipients['to']))

		{
$get_users = array_merge($get_users, $recipients['to']);
}

		{
$get_users = array_merge($get_users, $recipients['to']);
}

Zeile 355Zeile 341
	$get_users = implode(',', array_unique($get_users));

// Grab info

	$get_users = implode(',', array_unique($get_users));

// Grab info

	if($get_users)

	if($get_users)

	{
$users_query = $db->simple_select("users", "uid, username, usergroup, displaygroup", "uid IN ({$get_users})");
while($user = $db->fetch_array($users_query))

	{
$users_query = $db->simple_select("users", "uid, username, usergroup, displaygroup", "uid IN ({$get_users})");
while($user = $db->fetch_array($users_query))

Zeile 379Zeile 365

// Determine Folder Icon
if($message['status'] == 0)


// Determine Folder Icon
if($message['status'] == 0)

		{

		{

			$msgstatus = 'new_pm';
$msgalt = $lang->new_pm;
}

			$msgstatus = 'new_pm';
$msgalt = $lang->new_pm;
}

Zeile 392Zeile 378
		{
$msgstatus = 're_pm';
$msgalt = $lang->reply_pm;

		{
$msgstatus = 're_pm';
$msgalt = $lang->reply_pm;

		}

		}

		else if($message['status'] == 4)
{
$msgstatus = 'fw_pm';

		else if($message['status'] == 4)
{
$msgstatus = 'fw_pm';

Zeile 407Zeile 393
			// Sent Items or Drafts Folder Check
$recipients = my_unserialize($message['recipients']);
$to_users = $bcc_users = '';

			// Sent Items or Drafts Folder Check
$recipients = my_unserialize($message['recipients']);
$to_users = $bcc_users = '';

			if(count($recipients['to']) > 1 || (count($recipients['to']) == 1 && isset($recipients['bcc']) && count($recipients['bcc']) > 0))




			if(
isset($recipients['to']) &&
(count($recipients['to']) > 1 || (count($recipients['to']) == 1 && isset($recipients['bcc']) && count($recipients['bcc']) > 0))
)

			{
foreach($recipients['to'] as $uid)
{

			{
foreach($recipients['to'] as $uid)
{

Zeile 467Zeile 456
		else
{
$icon = '	';

		else
{
$icon = '	';

		}

		}


if(!trim($message['subject']))
{


if(!trim($message['subject']))
{

Zeile 477Zeile 466
		$message['subject'] = $parser->parse_badwords($message['subject']);

if(my_strlen($message['subject']) > 50)

		$message['subject'] = $parser->parse_badwords($message['subject']);

if(my_strlen($message['subject']) > 50)

		{

		{

			$message['subject'] = htmlspecialchars_uni(my_substr($message['subject'], 0, 50)."...");

			$message['subject'] = htmlspecialchars_uni(my_substr($message['subject'], 0, 50)."...");

		}
else

		}
else

		{
$message['subject'] = htmlspecialchars_uni($message['subject']);

		{
$message['subject'] = htmlspecialchars_uni($message['subject']);

		}


		}


		if($message['folder'] != "3")
{
$senddate = my_date('relative', $message['dateline']);
}
else

		if($message['folder'] != "3")
{
$senddate = my_date('relative', $message['dateline']);
}
else

		{

		{

			$senddate = $lang->not_sent;

			$senddate = $lang->not_sent;

		}

		}





		$foldername = $foldernames[$message['folder']];






		$fid = "0";
if((int)$message['folder'] > 1)
{
$fid = $message['folder'];
}
$foldername = $foldernames[$fid];


// What we do here is parse the post using our post parser, then strip the tags from it
$parser_options = array(


// What we do here is parse the post using our post parser, then strip the tags from it
$parser_options = array(

Zeile 537Zeile 531
if($mybb->input['action'] == "dismiss_notice")
{
if($mybb->user['pmnotice'] != 2)

if($mybb->input['action'] == "dismiss_notice")
{
if($mybb->user['pmnotice'] != 2)

	{
exit;
}

// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));

	{
exit;
}

// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));


$updated_user = array(
"pmnotice" => 1


$updated_user = array(
"pmnotice" => 1

Zeile 587Zeile 581
		WHERE LOWER(u.username) IN ('{$to_escaped}') AND pm.dateline > {$time_cutoff} AND pm.fromid='{$mybb->user['uid']}' AND pm.subject='".$db->escape_string($mybb->get_input('subject'))."' AND pm.message='".$db->escape_string($mybb->get_input('message'))."' AND pm.folder!='3'
LIMIT 0, 1
");

		WHERE LOWER(u.username) IN ('{$to_escaped}') AND pm.dateline > {$time_cutoff} AND pm.fromid='{$mybb->user['uid']}' AND pm.subject='".$db->escape_string($mybb->get_input('subject'))."' AND pm.message='".$db->escape_string($mybb->get_input('message'))."' AND pm.folder!='3'
LIMIT 0, 1
");

	$duplicate_check = $db->fetch_field($query, "pmid");
if($duplicate_check)

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


	{
error($lang->error_pm_already_submitted);
}

	{
error($lang->error_pm_already_submitted);
}

Zeile 655Zeile 648

// Now let the pm handler do all the hard work.
if(!$pmhandler->validate_pm())


// Now let the pm handler do all the hard work.
if(!$pmhandler->validate_pm())

	{

	{

		$pm_errors = $pmhandler->get_friendly_errors();
$send_errors = inline_error($pm_errors);
$mybb->input['action'] = "send";

		$pm_errors = $pmhandler->get_friendly_errors();
$send_errors = inline_error($pm_errors);
$mybb->input['action'] = "send";

Zeile 664Zeile 657
	{
$pminfo = $pmhandler->insert_pm();
$plugins->run_hooks("private_do_send_end");

	{
$pminfo = $pmhandler->insert_pm();
$plugins->run_hooks("private_do_send_end");





		if(isset($pminfo['draftsaved']))
{
redirect("private.php", $lang->redirect_pmsaved);

		if(isset($pminfo['draftsaved']))
{
redirect("private.php", $lang->redirect_pmsaved);

Zeile 673Zeile 666
		{
redirect("private.php", $lang->redirect_pmsent);
}

		{
redirect("private.php", $lang->redirect_pmsent);
}

	}

	}

}

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

}

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

Zeile 682Zeile 675
	{
error_no_permission();
}

	{
error_no_permission();
}





	$plugins->run_hooks("private_send_start");

$smilieinserter = $codebuttons = '';

	$plugins->run_hooks("private_send_start");

$smilieinserter = $codebuttons = '';

Zeile 691Zeile 684
	{
$codebuttons = build_mycode_inserter("message", $mybb->settings['pmsallowsmilies']);
if($mybb->settings['pmsallowsmilies'] != 0)

	{
$codebuttons = build_mycode_inserter("message", $mybb->settings['pmsallowsmilies']);
if($mybb->settings['pmsallowsmilies'] != 0)

		{

		{

			$smilieinserter = build_clickable_smilies();
}
}

			$smilieinserter = build_clickable_smilies();
}
}

Zeile 836Zeile 829
				foreach($recipients['to'] as $recipient)
{
$recipient_list['to'][] = $recipient;

				foreach($recipients['to'] as $recipient)
{
$recipient_list['to'][] = $recipient;

					$recipientids .= $comma.$recipient;
$comma = ',';
}
}

					$recipientids .= $comma.$recipient;
$comma = ',';
}
}


if(isset($recipients['bcc']) && is_array($recipients['bcc']))
{


if(isset($recipients['bcc']) && is_array($recipients['bcc']))
{

Zeile 950Zeile 943

// Load the auto complete javascript if it is enabled.
eval("\$autocompletejs = \"".$templates->get("private_send_autocomplete")."\";");


// Load the auto complete javascript if it is enabled.
eval("\$autocompletejs = \"".$templates->get("private_send_autocomplete")."\";");


$pmid = $mybb->get_input('pmid', MyBB::INPUT_INT);


$pmid = $mybb->get_input('pmid', MyBB::INPUT_INT);

	$do = $mybb->get_input('do');
if($do != "forward" && $do != "reply" && $do != "replyall")
{

	$do = $mybb->get_input('do');
if($do != "forward" && $do != "reply" && $do != "replyall")
{

Zeile 1025Zeile 1018
	if($pm['receipt'] == 1)
{
if($mybb->usergroup['candenypmreceipts'] == 1 && $mybb->get_input('denyreceipt', MyBB::INPUT_INT) == 1)

	if($pm['receipt'] == 1)
{
if($mybb->usergroup['candenypmreceipts'] == 1 && $mybb->get_input('denyreceipt', MyBB::INPUT_INT) == 1)

		{

		{

			$receiptadd = 0;
}
else

			$receiptadd = 0;
}
else

Zeile 1107Zeile 1100
	// Fetch the recipients for this message
$pm['recipients'] = my_unserialize($pm['recipients']);


	// Fetch the recipients for this message
$pm['recipients'] = my_unserialize($pm['recipients']);


	if(is_array($pm['recipients']['to']))

	if(isset($pm['recipients']['to']) && is_array($pm['recipients']['to']))

	{
$uid_sql = implode(',', $pm['recipients']['to']);
}

	{
$uid_sql = implode(',', $pm['recipients']['to']);
}

Zeile 1137Zeile 1130
		{
$bcc_recipients[] = build_profile_link($recipient['username'], $recipient['uid']);
$bcc_form_val[] = $recipient['username'];

		{
$bcc_recipients[] = build_profile_link($recipient['username'], $recipient['uid']);
$bcc_form_val[] = $recipient['username'];

		}

		}

		// User is a normal recipient
else if(in_array($recipient['uid'], $pm['recipients']['to']))
{

		// User is a normal recipient
else if(in_array($recipient['uid'], $pm['recipients']['to']))
{

Zeile 1183Zeile 1176
	{
$trow = alt_trow();


	{
$trow = alt_trow();


		$optionschecked = array('savecopy' => 'checked="checked"');

		$optionschecked = array('savecopy' => 'checked="checked"', 'signature' => '', 'disablesmilies' => '');

		if(!empty($mybb->user['signature']))
{
$optionschecked['signature'] = 'checked="checked"';

		if(!empty($mybb->user['signature']))
{
$optionschecked['signature'] = 'checked="checked"';

Zeile 1212Zeile 1205
		if($mybb->user['uid'] == $pm['fromid'])
{
$to = htmlspecialchars_uni($mybb->user['username']);

		if($mybb->user['uid'] == $pm['fromid'])
{
$to = htmlspecialchars_uni($mybb->user['username']);

		}

		}

		else
{
$query = $db->simple_select('users', 'username', "uid='{$pm['fromid']}'");
$to = htmlspecialchars_uni($db->fetch_field($query, 'username'));

		else
{
$query = $db->simple_select('users', 'username', "uid='{$pm['fromid']}'");
$to = htmlspecialchars_uni($db->fetch_field($query, 'username'));

		}

		}


$private_send_tracking = '';
if($mybb->usergroup['cantrackpms'])


$private_send_tracking = '';
if($mybb->usergroup['cantrackpms'])

Zeile 1226Zeile 1219

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


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

		
$expaltext = (in_array("quickreply", $collapse)) ? "[+]" : "[-]";

















$postoptionschecked = $optionschecked; // Backwards compatability instead of correcting variable used in template

if(!isset($collapsedthead['quickreply']))
{
$collapsedthead['quickreply'] = '';
}
if(!isset($collapsedimg['quickreply']))
{
$collapsedimg['quickreply'] = '';
}
if(!isset($collapsed['quickreply_e']))
{
$collapsed['quickreply_e'] = '';
}

$expaltext = (in_array("quickreply", $collapse)) ? $lang->expcol_expand : $lang->expcol_collapse;

		eval("\$quickreply = \"".$templates->get("private_quickreply")."\";");
}


		eval("\$quickreply = \"".$templates->get("private_quickreply")."\";");
}


Zeile 1251Zeile 1259
	if(!$mybb->settings['postsperpage'] || (int)$mybb->settings['postsperpage'] < 1)
{
$mybb->settings['postsperpage'] = 20;

	if(!$mybb->settings['postsperpage'] || (int)$mybb->settings['postsperpage'] < 1)
{
$mybb->settings['postsperpage'] = 20;

	}

	}


// Figure out if we need to display multiple pages.
$perpage = $mybb->settings['postsperpage'];


// Figure out if we need to display multiple pages.
$perpage = $mybb->settings['postsperpage'];

Zeile 1594Zeile 1602
	foreach($foldersexploded as $key => $folders)
{
$folderinfo = explode("**", $folders, 2);

	foreach($foldersexploded as $key => $folders)
{
$folderinfo = explode("**", $folders, 2);

 
		$unread = ''; 

		$fid = $folderinfo[0];

		$fid = $folderinfo[0];

		$foldername = get_pm_folder_name($fid, $folderinfo[1]);
$query = $db->simple_select("privatemessages", "COUNT(*) AS pmsinfolder", " folder='$fid' AND uid='".$mybb->user['uid']."'");










		if($folderinfo[0] == "1")
{
$fid = "1";
$unread = " AND status='0'";
}
if($folderinfo[0] == "0")
{
$fid = "1";
}
$foldername = get_pm_folder_name($folderinfo[0], $folderinfo[1]);
$query = $db->simple_select("privatemessages", "COUNT(*) AS pmsinfolder", " folder='$fid'$unread AND uid='".$mybb->user['uid']."'");

		$thing = $db->fetch_array($query);
$foldercount = my_number_format($thing['pmsinfolder']);
eval("\$folderlist .= \"".$templates->get("private_empty_folder")."\";");
}

		$thing = $db->fetch_array($query);
$foldercount = my_number_format($thing['pmsinfolder']);
eval("\$folderlist .= \"".$templates->get("private_empty_folder")."\";");
}





	$plugins->run_hooks("private_empty_end");

eval("\$folders = \"".$templates->get("private_empty")."\";");
output_page($folders);

	$plugins->run_hooks("private_empty_end");

eval("\$folders = \"".$templates->get("private_empty")."\";");
output_page($folders);

}

}


if($mybb->input['action'] == "do_empty" && $mybb->request_method == "post")
{


if($mybb->input['action'] == "do_empty" && $mybb->request_method == "post")
{

Zeile 1625Zeile 1643
	if(!empty($mybb->input['empty']))
{
foreach($mybb->input['empty'] as $key => $val)

	if(!empty($mybb->input['empty']))
{
foreach($mybb->input['empty'] as $key => $val)

		{

		{

			if($val == 1)
{
$key = (int)$key;

			if($val == 1)
{
$key = (int)$key;

Zeile 1634Zeile 1652
					$emptyq .= " OR ";
}
$emptyq .= "folder='$key'";

					$emptyq .= " OR ";
}
$emptyq .= "folder='$key'";

			}
}

			}
}


if($emptyq != '')
{


if($emptyq != '')
{

Zeile 1645Zeile 1663

// Update PM count
update_pm_count();


// Update PM count
update_pm_count();





	$plugins->run_hooks("private_do_empty_end");
redirect("private.php", $lang->redirect_pmfoldersemptied);
}

	$plugins->run_hooks("private_do_empty_end");
redirect("private.php", $lang->redirect_pmfoldersemptied);
}

Zeile 1654Zeile 1672
{
// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));

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





	$plugins->run_hooks("private_do_stuff");

if(!empty($mybb->input['hop']))

	$plugins->run_hooks("private_do_stuff");

if(!empty($mybb->input['hop']))

	{

	{

		header("Location: private.php?fid=".$mybb->get_input('jumpto'));
}
elseif(!empty($mybb->input['moveto']))
{

		header("Location: private.php?fid=".$mybb->get_input('jumpto'));
}
elseif(!empty($mybb->input['moveto']))
{

		$mybb->input['check'] = $mybb->get_input('check', MyBB::INPUT_ARRAY);
if(!empty($mybb->input['check']))

		$pms = array_map('intval', array_keys($mybb->get_input('check', MyBB::INPUT_ARRAY)));
if(!empty($pms))

		{

		{

			foreach($mybb->input['check'] as $key => $val)

			if(!$mybb->input['fid'])

			{

			{

				$sql_array = array(
"folder" => $mybb->input['fid']
);
$db->update_query("privatemessages", $sql_array, "pmid='".(int)$key."' AND uid='".$mybb->user['uid']."'");








				$mybb->input['fid'] = 1;
}

if(array_key_exists($mybb->input['fid'], $foldernames))
{
$db->update_query("privatemessages", array("folder" => $mybb->input['fid']), "pmid IN (".implode(",", $pms).") AND uid='".$mybb->user['uid']."'");
update_pm_count();
}
else
{
error($lang->error_invalidmovefid);

			}
}

			}
}

		// Update PM count
update_pm_count();

 

if(!empty($mybb->input['fromfid']))
{


if(!empty($mybb->input['fromfid']))
{

Zeile 2025Zeile 2048
	if($mybb->input['exporttype'] == "html")
{
// Gather global stylesheet for HTML

	if($mybb->input['exporttype'] == "html")
{
// Gather global stylesheet for HTML

		$query = $db->simple_select("themestylesheets", "stylesheet", "sid = '1'", array('limit' => 1));


		$css_tid = empty($theme['tid']) ? '' : "'". (int)$theme['tid'] ."',";
$query = $db->simple_select("themestylesheets", "stylesheet", "tid in ({$css_tid}'2','1') AND name = 'global.css'", array('order_by' => 'tid', 'order_dir' => 'DESC', 'limit' => 1));

		$css = $db->fetch_field($query, "stylesheet");
}


		$css = $db->fetch_field($query, "stylesheet");
}


Zeile 2132Zeile 2156
	eval("\$orderarrow['$sortby'] = \"".$templates->get("private_orderarrow")."\";");

// Do Multi Pages

	eval("\$orderarrow['$sortby'] = \"".$templates->get("private_orderarrow")."\";");

// Do Multi Pages

	$query = $db->simple_select("privatemessages", "COUNT(*) AS total", "uid='".$mybb->user['uid']."' AND folder='$folder'");







	$selective = "";
if($fid == 1)
{
$selective = " AND status='0'";
}

$query = $db->simple_select("privatemessages", "COUNT(*) AS total", "uid='".$mybb->user['uid']."' AND folder='$folder'$selective");

	$pmscount = $db->fetch_field($query, "total");

if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1)

	$pmscount = $db->fetch_field($query, "total");

if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1)

Zeile 2207Zeile 2237
		while($row = $db->fetch_array($users_query))
{
$recipients = my_unserialize($row['recipients']);

		while($row = $db->fetch_array($users_query))
{
$recipients = my_unserialize($row['recipients']);

			if(is_array($recipients['to']) && count($recipients['to']))

			if(isset($recipients['to']) && is_array($recipients['to']) && count($recipients['to']))

			{
$get_users = array_merge($get_users, $recipients['to']);
}

			{
$get_users = array_merge($get_users, $recipients['to']);
}

Zeile 2246Zeile 2276
	{
if($fid == 1)
{

	{
if($fid == 1)
{

			$selective = ' AND pm.status="0"';

			$selective = " AND pm.status='0'";

		}

if($sortfield == "username")

		}

if($sortfield == "username")

Zeile 2271Zeile 2301

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


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

 
		$bgcolor = alt_trow(true);

		while($message = $db->fetch_array($query))
{
$msgalt = $msgstatus = '';

		while($message = $db->fetch_array($query))
{
$msgalt = $msgstatus = '';

Zeile 2306Zeile 2337
				{
foreach($recipients['to'] as $uid)
{

				{
foreach($recipients['to'] as $uid)
{

 
						if(!isset($cached_users[$uid]))
{
continue;
}

						$profilelink = get_profile_link($uid);
$user = $cached_users[$uid];
$user['username'] = htmlspecialchars_uni($user['username']);
$username = format_name($user['username'], $user['usergroup'], $user['displaygroup']);
if(!$user['username'])

						$profilelink = get_profile_link($uid);
$user = $cached_users[$uid];
$user['username'] = htmlspecialchars_uni($user['username']);
$username = format_name($user['username'], $user['usergroup'], $user['displaygroup']);
if(!$user['username'])

						{

						{

							$username = $lang->na;
}
eval("\$to_users .= \"".$templates->get("private_multiple_recipients_user")."\";");

							$username = $lang->na;
}
eval("\$to_users .= \"".$templates->get("private_multiple_recipients_user")."\";");

Zeile 2321Zeile 2356
						eval("\$bcc_users = \"".$templates->get("private_multiple_recipients_bcc")."\";");
foreach($recipients['bcc'] as $uid)
{

						eval("\$bcc_users = \"".$templates->get("private_multiple_recipients_bcc")."\";");
foreach($recipients['bcc'] as $uid)
{

 
							if(!isset($cached_users[$uid]))
{
continue;
}

							$profilelink = get_profile_link($uid);
$user = $cached_users[$uid];
$user['username'] = htmlspecialchars_uni($user['username']);

							$profilelink = get_profile_link($uid);
$user = $cached_users[$uid];
$user['username'] = htmlspecialchars_uni($user['username']);

Zeile 2392Zeile 2431

$message['subject'] = htmlspecialchars_uni($parser->parse_badwords($message['subject']));
if($message['folder'] != "3")


$message['subject'] = htmlspecialchars_uni($parser->parse_badwords($message['subject']));
if($message['folder'] != "3")

			{

			{

				$senddate = my_date('relative', $message['dateline']);
}
else

				$senddate = my_date('relative', $message['dateline']);
}
else

Zeile 2403Zeile 2442
			$plugins->run_hooks("private_message");

eval("\$messagelist .= \"".$templates->get("private_messagebit")."\";");

			$plugins->run_hooks("private_message");

eval("\$messagelist .= \"".$templates->get("private_messagebit")."\";");

 
			$bgcolor = alt_trow();

		}
}
else

		}
}
else

Zeile 2445Zeile 2485
			{
$spaceused_severity = "high";
}

			{
$spaceused_severity = "high";
}

			



			$overhalf = round($spaceused, 0)."%";
if((int)$overhalf > 100)
{

			$overhalf = round($spaceused, 0)."%";
if((int)$overhalf > 100)
{