Vergleich private.php - 1.8.18 - 1.8.23

  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();

}

if(!$mybb->user['pmfolders'])
{
$mybb->user['pmfolders'] = "1**$%%$2**$%%$3**$%%$4**";

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

$folder_id = $folder_name = '';

}

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

$folder_id = $folder_name = '';





$foldernames = array();
$foldersexploded = explode("$%%$", $mybb->user['pmfolders']);
foreach($foldersexploded as $key => $folders)
{
$folderinfo = explode("**", $folders, 2);
if($mybb->input['fid'] == $folderinfo[0])

$foldernames = array();
$foldersexploded = explode("$%%$", $mybb->user['pmfolders']);
foreach($foldersexploded as $key => $folders)
{
$folderinfo = explode("**", $folders, 2);
if($mybb->input['fid'] == $folderinfo[0])

	{

	{

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

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

Zeile 76Zeile 66
	$folder_name = $folderinfo[1];

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

	$folder_name = $folderinfo[1];

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 183Zeile 182
		"sender" => $mybb->get_input('sender'),
"status" => $mybb->get_input('status', MyBB::INPUT_ARRAY),
"folder" => $mybb->get_input('folder', MyBB::INPUT_ARRAY)

		"sender" => $mybb->get_input('sender'),
"status" => $mybb->get_input('status', MyBB::INPUT_ARRAY),
"folder" => $mybb->get_input('folder', MyBB::INPUT_ARRAY)

	);

	);


if($db->can_search == true)
{


if($db->can_search == true)
{

Zeile 208Zeile 207
		"keywords" => $db->escape_string($mybb->get_input('keywords')),
);
$plugins->run_hooks("private_do_search_process");

		"keywords" => $db->escape_string($mybb->get_input('keywords')),
);
$plugins->run_hooks("private_do_search_process");





	$db->insert_query("searchlog", $searcharray);

// Sender sort won't work yet

	$db->insert_query("searchlog", $searcharray);

// Sender sort won't work yet

Zeile 217Zeile 216
	if(in_array($mybb->get_input('sort'), $sortby))
{
$sortby = $mybb->get_input('sort');

	if(in_array($mybb->get_input('sort'), $sortby))
{
$sortby = $mybb->get_input('sort');

	}

	}

	else
{
$sortby = "dateline";

	else
{
$sortby = "dateline";

Zeile 319Zeile 318
	$multipage = multipage($pmscount, $perpage, $page, "private.php?action=results&sid=".htmlspecialchars_uni($mybb->get_input('sid'))."&sortby={$sortby}&order={$order}");
$messagelist = '';


	$multipage = multipage($pmscount, $perpage, $page, "private.php?action=results&sid=".htmlspecialchars_uni($mybb->get_input('sid'))."&sortby={$sortby}&order={$order}");
$messagelist = '';


	$icon_cache = $cache->read("posticons");


	$icon_cache = $cache->read("posticons");


	// Cache users in multiple recipients for sent & drafts folder
// Get all recipients into an array
$cached_users = $get_users = array();

	// Cache users in multiple recipients for sent & drafts folder
// Get all recipients into an array
$cached_users = $get_users = array();

Zeile 481Zeile 480
			$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 524Zeile 528
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 542Zeile 546
		exit;
}
else

		exit;
}
else

	{

	{

		header("Location: index.php");
exit;
}
}

		header("Location: index.php");
exit;
}
}





$send_errors = '';

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

$send_errors = '';

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

Zeile 559Zeile 563

// 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_send_do_send");

// Attempt to see if this PM is a duplicate or not

	$plugins->run_hooks("private_send_do_send");

// Attempt to see if this PM is a duplicate or not

Zeile 582Zeile 586

require_once MYBB_ROOT."inc/datahandlers/pm.php";
$pmhandler = new PMDataHandler();


require_once MYBB_ROOT."inc/datahandlers/pm.php";
$pmhandler = new PMDataHandler();





	$pm = array(
"subject" => $mybb->get_input('subject'),
"message" => $mybb->get_input('message'),

	$pm = array(
"subject" => $mybb->get_input('subject'),
"message" => $mybb->get_input('message'),

Zeile 591Zeile 595
		"do" => $mybb->get_input('do'),
"pmid" => $mybb->get_input('pmid', MyBB::INPUT_INT),
"ipaddress" => $session->packedip

		"do" => $mybb->get_input('do'),
"pmid" => $mybb->get_input('pmid', MyBB::INPUT_INT),
"ipaddress" => $session->packedip

	);


	);


	// Split up any recipients we have
$pm['to'] = $to;
if(!empty($mybb->input['bcc']))
{
$pm['bcc'] = explode(",", $mybb->get_input('bcc'));
$pm['bcc'] = array_map("trim", $pm['bcc']);

	// Split up any recipients we have
$pm['to'] = $to;
if(!empty($mybb->input['bcc']))
{
$pm['bcc'] = explode(",", $mybb->get_input('bcc'));
$pm['bcc'] = array_map("trim", $pm['bcc']);

	}

	}


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



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


Zeile 624Zeile 628
	if(isset($mybb->input['options']['savecopy']) && $mybb->input['options']['savecopy'] == 1)
{
$pm['options']['savecopy'] = 1;

	if(isset($mybb->input['options']['savecopy']) && $mybb->input['options']['savecopy'] == 1)
{
$pm['options']['savecopy'] = 1;

	}
else
{

	}
else
{

		$pm['options']['savecopy'] = 0;
}
if(isset($mybb->input['options']['readreceipt']))

		$pm['options']['savecopy'] = 0;
}
if(isset($mybb->input['options']['readreceipt']))

Zeile 635Zeile 639
	}

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

	}

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

	{

	{

		$pm['saveasdraft'] = 1;
}
$pmhandler->set_data($pm);

		$pm['saveasdraft'] = 1;
}
$pmhandler->set_data($pm);





	// 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())
{

Zeile 659Zeile 663
		else
{
redirect("private.php", $lang->redirect_pmsent);

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

		}
}

		}
}

}

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

}

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

Zeile 668Zeile 672
	if($mybb->usergroup['cansendpms'] == 0)
{
error_no_permission();

	if($mybb->usergroup['cansendpms'] == 0)
{
error_no_permission();

	}


	}


	$plugins->run_hooks("private_send_start");

$smilieinserter = $codebuttons = '';

	$plugins->run_hooks("private_send_start");

$smilieinserter = $codebuttons = '';





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

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

Zeile 682Zeile 686
			$smilieinserter = build_clickable_smilies();
}
}

			$smilieinserter = build_clickable_smilies();
}
}





	$lang->post_icon = $lang->message_icon;

$posticons = get_post_icons();

	$lang->post_icon = $lang->message_icon;

$posticons = get_post_icons();

Zeile 693Zeile 697
	$to = $bcc = '';

if(!empty($mybb->input['preview']) || $send_errors)

	$to = $bcc = '';

if(!empty($mybb->input['preview']) || $send_errors)

	{
$options = $mybb->get_input('options', MyBB::INPUT_ARRAY);

	{
$options = $mybb->get_input('options', MyBB::INPUT_ARRAY);

		if(isset($options['signature']) && $options['signature'] == 1)

		if(isset($options['signature']) && $options['signature'] == 1)

		{

		{

			$optionschecked['signature'] = 'checked="checked"';
}
if(isset($options['disablesmilies']) && $options['disablesmilies'] == 1)

			$optionschecked['signature'] = 'checked="checked"';
}
if(isset($options['disablesmilies']) && $options['disablesmilies'] == 1)

		{

		{

			$optionschecked['disablesmilies'] = 'checked="checked"';
}
if(isset($options['savecopy']) && $options['savecopy'] != 0)

			$optionschecked['disablesmilies'] = 'checked="checked"';
}
if(isset($options['savecopy']) && $options['savecopy'] != 0)

		{

		{

			$optionschecked['savecopy'] = 'checked="checked"';
}
if(isset($options['readreceipt']) && $options['readreceipt'] != 0)

			$optionschecked['savecopy'] = 'checked="checked"';
}
if(isset($options['readreceipt']) && $options['readreceipt'] != 0)

Zeile 725Zeile 729
			FROM ".TABLE_PREFIX."users u
LEFT JOIN ".TABLE_PREFIX."userfields f ON (f.ufid=u.uid)
WHERE u.uid='".$mybb->user['uid']."'

			FROM ".TABLE_PREFIX."users u
LEFT JOIN ".TABLE_PREFIX."userfields f ON (f.ufid=u.uid)
WHERE u.uid='".$mybb->user['uid']."'

		");

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


		");

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


		$post['userusername'] = $mybb->user['username'];
$post['postusername'] = $mybb->user['username'];
$post['message'] = $mybb->get_input('message');

		$post['userusername'] = $mybb->user['username'];
$post['postusername'] = $mybb->user['username'];
$post['message'] = $mybb->get_input('message');

Zeile 737Zeile 741
		if(!isset($options['disablesmilies']))
{
$options['disablesmilies'] = 0;

		if(!isset($options['disablesmilies']))
{
$options['disablesmilies'] = 0;

		}

		}

		$post['smilieoff'] = $options['disablesmilies'];
$post['dateline'] = TIME_NOW;


		$post['smilieoff'] = $options['disablesmilies'];
$post['dateline'] = TIME_NOW;


Zeile 762Zeile 766
		);

foreach($data_key as $field => $key)

		);

foreach($data_key as $field => $key)

		{

		{

			$post[$key] = $groupscache[$post['usergroup']][$field];
}


			$post[$key] = $groupscache[$post['usergroup']][$field];
}


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

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

		}

		}

		if($mybb->usergroup['cantrackpms'] == 1)
{
$optionschecked['readreceipt'] = 'checked="checked"';

		if($mybb->usergroup['cantrackpms'] == 1)
{
$optionschecked['readreceipt'] = 'checked="checked"';

Zeile 796Zeile 800
		$pm = $db->fetch_array($query);
$message = htmlspecialchars_uni($parser->parse_badwords($pm['message']));
$subject = htmlspecialchars_uni($parser->parse_badwords($pm['subject']));

		$pm = $db->fetch_array($query);
$message = htmlspecialchars_uni($parser->parse_badwords($pm['message']));
$subject = htmlspecialchars_uni($parser->parse_badwords($pm['subject']));





		if($pm['folder'] == "3")
{
// message saved in drafts

		if($pm['folder'] == "3")
{
// message saved in drafts

Zeile 864Zeile 868
			require_once MYBB_ROOT."inc/functions_posting.php";

if($mybb->settings['maxpmquotedepth'] != '0')

			require_once MYBB_ROOT."inc/functions_posting.php";

if($mybb->settings['maxpmquotedepth'] != '0')

			{

			{

				$message = remove_message_quotes($message, $mybb->settings['maxpmquotedepth']);
}


				$message = remove_message_quotes($message, $mybb->settings['maxpmquotedepth']);
}


Zeile 1407Zeile 1411
	{
$mybb->input['unreadcheck'] = $mybb->get_input('unreadcheck', MyBB::INPUT_ARRAY);
if(!empty($mybb->input['unreadcheck']))

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

		{

		{

			foreach($mybb->input['unreadcheck'] as $pmid => $val)
{
$pmids[$pmid] = (int)$pmid;

			foreach($mybb->input['unreadcheck'] as $pmid => $val)
{
$pmids[$pmid] = (int)$pmid;

Zeile 1461Zeile 1465
		$fid = $folderinfo[0];
$foldername = get_pm_folder_name($fid, $foldername);


		$fid = $folderinfo[0];
$foldername = get_pm_folder_name($fid, $foldername);


		if($folderinfo[0] == "1" || $folderinfo[0] == "2" || $folderinfo[0] == "3" || $folderinfo[0] == "4")

		if((int)$folderinfo[0] < 5)

		{
$foldername2 = get_pm_folder_name($fid);
eval("\$folderlist .= \"".$templates->get("private_folders_folder_unremovable")."\";");

		{
$foldername2 = get_pm_folder_name($fid);
eval("\$folderlist .= \"".$templates->get("private_folders_folder_unremovable")."\";");

Zeile 1516Zeile 1520

$fid = (int)$key;
// Use default language strings if empty or value is language string


$fid = (int)$key;
// Use default language strings if empty or value is language string

				switch($fid)

				if($val == get_pm_folder_name($fid) || trim($val) == '')

				{

				{

					case 1:
if($val == $lang->folder_inbox || trim($val) == '')
{
$val = '';
}
break;
case 2:
if($val == $lang->folder_sent_items || trim($val) == '')
{
$val = '';
}
break;
case 3:
if($val == $lang->folder_drafts || trim($val) == '')
{
$val = '';
}
break;
case 4:
if($val == $lang->folder_trash || trim($val) == '')
{
$val = '';
}
break;
}
}

if($val != '' && trim($val) == '' && !($key >= 1 && $key <= 4))

					$val = '';
}
}

if($val != '' && trim($val) == '' && !(is_numeric($key) && $key <= 4))
























			{
// If the name only contains whitespace and it's not a default folder, print an error
error($lang->error_emptypmfoldername);
}


			{
// If the name only contains whitespace and it's not a default folder, print an error
error($lang->error_emptypmfoldername);
}


			if($val != '' || ($key >= 1 && $key <= 4))

			if($val != '' || (is_numeric($key) && $key <= 4))

			{
// If there is a name or if this is a default folder, save it
$foldername = $db->escape_string(htmlspecialchars_uni($val));

			{
// If there is a name or if this is a default folder, save it
$foldername = $db->escape_string(htmlspecialchars_uni($val));

Zeile 1567Zeile 1548
				else
{
error($lang->error_invalidpmfoldername);

				else
{
error($lang->error_invalidpmfoldername);

				}

				}

			}
else
{

			}
else
{

Zeile 1575Zeile 1556
				$db->delete_query("privatemessages", "folder='$fid' AND uid='".$mybb->user['uid']."'");
}
}

				$db->delete_query("privatemessages", "folder='$fid' AND uid='".$mybb->user['uid']."'");
}
}

	}

	}


$sql_array = array(
"pmfolders" => $folders


$sql_array = array(
"pmfolders" => $folders

Zeile 1600Zeile 1581
	$plugins->run_hooks("private_empty_start");

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

	$plugins->run_hooks("private_empty_start");

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

	$folderlist = '';

	$folderlist = $unread = '';

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

	foreach($foldersexploded as $key => $folders)
{
$folderinfo = explode("**", $folders, 2);
$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")."\";");

Zeile 1673Zeile 1663
	}
elseif(!empty($mybb->input['moveto']))
{

	}
elseif(!empty($mybb->input['moveto']))
{

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











		$pms = array_map('intval', array_keys($mybb->get_input('check', MyBB::INPUT_ARRAY)));
if(!empty($pms))
{
if(!$mybb->input['fid'])
{
$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

			{

			{

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

				error($lang->error_invalidmovefid);




			}

			}

		}
// Update PM count
update_pm_count();

		}




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


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

		{

		{

			redirect("private.php?fid=".$mybb->get_input('fromfid', MyBB::INPUT_INT), $lang->redirect_pmsmoved);
}
else

			redirect("private.php?fid=".$mybb->get_input('fromfid', MyBB::INPUT_INT), $lang->redirect_pmsmoved);
}
else

		{

		{

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

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

Zeile 1702Zeile 1697
		if(!empty($mybb->input['check']))
{
$pmssql = '';

		if(!empty($mybb->input['check']))
{
$pmssql = '';

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

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

				if($pmssql)
{
$pmssql .= ",";

				if($pmssql)
{
$pmssql .= ",";

Zeile 2086Zeile 2081

if(!$mybb->input['fid'] || !array_key_exists($mybb->input['fid'], $foldernames))
{


if(!$mybb->input['fid'] || !array_key_exists($mybb->input['fid'], $foldernames))
{

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

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

	}


	}


	$folder = $mybb->input['fid'];
$foldername = $foldernames[$folder];


	$fid = (int)$mybb->input['fid'];
$folder = !$fid ? 1 : $fid;
$foldername = $foldernames[$fid];


if($folder == 2 || $folder == 3)
{ // Sent Items Folder


if($folder == 2 || $folder == 3)
{ // Sent Items Folder

Zeile 2141Zeile 2137
	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 2178Zeile 2180
	}

if($mybb->input['order'] || ($sortby && $sortby != "dateline"))

	}

if($mybb->input['order'] || ($sortby && $sortby != "dateline"))

	{
$page_url = "private.php?fid={$folder}&sortby={$sortby}&order={$sortordernow}";
}
else
{
$page_url = "private.php?fid={$folder}";
}

	{
$page_url = "private.php?fid={$fid}&sortby={$sortby}&order={$sortordernow}";
}
else
{
$page_url = "private.php?fid={$fid}";
}


$multipage = multipage($pmscount, $perpage, $page, $page_url);


$multipage = multipage($pmscount, $perpage, $page, $page_url);

	$messagelist = '';


	$selective = $messagelist = '';


	$icon_cache = $cache->read("posticons");

// Cache users in multiple recipients for sent & drafts folder

	$icon_cache = $cache->read("posticons");

// Cache users in multiple recipients for sent & drafts folder

Zeile 2197Zeile 2199
		if($sortfield == "username")
{
$u = "u.";

		if($sortfield == "username")
{
$u = "u.";

		}
else

		}
else

		{
$u = "pm.";
}

		{
$u = "pm.";
}

Zeile 2224Zeile 2226
			if(isset($recipients['bcc']) && is_array($recipients['bcc']) && count($recipients['bcc']))
{
$get_users = array_merge($get_users, $recipients['bcc']);

			if(isset($recipients['bcc']) && is_array($recipients['bcc']) && count($recipients['bcc']))
{
$get_users = array_merge($get_users, $recipients['bcc']);

			}
}

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

			}
}

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


// Grab info
if($get_users)


// Grab info
if($get_users)

Zeile 2237Zeile 2239
			{
$cached_users[$user['uid']] = $user;
}

			{
$cached_users[$user['uid']] = $user;
}

		}
}


		}
}


	if($folder == 2 || $folder == 3)

	if($folder == 2 || $folder == 3)

	{

	{

		if($sortfield == "username")

		if($sortfield == "username")

		{

		{

			$pm = "tu.";
}
else
{
$pm = "pm.";

			$pm = "tu.";
}
else
{
$pm = "pm.";

		}

		}

	}
else
{

	}
else
{

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


		if($sortfield == "username")
{
$pm = "fu.";

		if($sortfield == "username")
{
$pm = "fu.";

Zeile 2268Zeile 2275
		FROM ".TABLE_PREFIX."privatemessages pm
LEFT JOIN ".TABLE_PREFIX."users fu ON (fu.uid=pm.fromid)
LEFT JOIN ".TABLE_PREFIX."users tu ON (tu.uid=pm.toid)

		FROM ".TABLE_PREFIX."privatemessages pm
LEFT JOIN ".TABLE_PREFIX."users fu ON (fu.uid=pm.fromid)
LEFT JOIN ".TABLE_PREFIX."users tu ON (tu.uid=pm.toid)

		WHERE pm.folder='$folder' AND pm.uid='".$mybb->user['uid']."'

		WHERE pm.folder='$folder' AND pm.uid='".$mybb->user['uid']."'{$selective}

		ORDER BY {$pm}{$sortfield} {$sortordernow}
LIMIT $start, $perpage
");

		ORDER BY {$pm}{$sortfield} {$sortordernow}
LIMIT $start, $perpage
");