Vergleich private.php - 1.8.20 - 1.8.21

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 60Zeile 60
if($update)
{
$sql_array = array(

if($update)
{
$sql_array = array(

		 "pmfolders" => $mybb->user['pmfolders']

		 "pmfolders" => $db->escape_string($mybb->user['pmfolders']),

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

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

Zeile 90Zeile 90

eval("\$folderjump_folder .= \"".$templates->get("private_jump_folders_folder")."\";");
eval("\$folderoplist_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 to omit "Unread"
if($folder_id != 1)
{
if($folder_id == 0)
{
$folder_id = 1;
}
eval("\$foldersearch_folder .= \"".$templates->get("private_jump_folders_folder")."\";");
}

}

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

}

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

Zeile 154Zeile 162

// Check if search flood checking is enabled and user is not admin
if($mybb->settings['searchfloodtime'] > 0 && $mybb->usergroup['cancp'] != 1)


// Check if search flood checking is enabled and user is not admin
if($mybb->settings['searchfloodtime'] > 0 && $mybb->usergroup['cancp'] != 1)

	{

	{

		// Fetch the time this user last searched
$timecut = TIME_NOW-$mybb->settings['searchfloodtime'];
$query = $db->simple_select("searchlog", "*", "uid='{$mybb->user['uid']}' AND dateline > '$timecut'", array('order_by' => "dateline", 'order_dir' => "DESC"));

		// Fetch the time this user last searched
$timecut = TIME_NOW-$mybb->settings['searchfloodtime'];
$query = $db->simple_select("searchlog", "*", "uid='{$mybb->user['uid']}' AND dateline > '$timecut'", array('order_by' => "dateline", 'order_dir' => "DESC"));

Zeile 344Zeile 352
		if(is_array($recipients['to']) && count($recipients['to']))
{
$get_users = array_merge($get_users, $recipients['to']);

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

		}


		}


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

Zeile 382Zeile 390
		{
$msgstatus = 'new_pm';
$msgalt = $lang->new_pm;

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

		}

		}

		else if($message['status'] == 1)
{
$msgstatus = 'old_pm';

		else if($message['status'] == 1)
{
$msgstatus = 'old_pm';

Zeile 438Zeile 446
				$tofromuid = $message['toid'];
}
else

				$tofromuid = $message['toid'];
}
else

			{

			{

				$tofromusername = $lang->not_sent;
}
}

				$tofromusername = $lang->not_sent;
}
}

Zeile 475Zeile 483
		}

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

		}

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





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

		if(my_strlen($message['subject']) > 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']);

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

Zeile 494Zeile 502
			$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 1110Zeile 1123
	if(is_array($pm['recipients']['to']))
{
$uid_sql = implode(',', $pm['recipients']['to']);

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

	}

	}

	else
{
$uid_sql = $pm['toid'];

	else
{
$uid_sql = $pm['toid'];

Zeile 1590Zeile 1603
	$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 1871Zeile 1893
				$folderlst .= ")";
}
$wsql .= "$folderlst";

				$folderlst .= ")";
}
$wsql .= "$folderlst";

		}
else
{
error($lang->error_pmnoarchivefolders);
}

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

		}
else
{
error($lang->error_pmnoarchivefolders);
}

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

		{
$wsql .= " AND pm.status!='0'";
}

		{
$wsql .= " AND pm.status!='0'";
}

	}

	}

	$query = $db->query("
SELECT pm.*, fu.username AS fromusername, tu.username AS tousername
FROM ".TABLE_PREFIX."privatemessages pm

	$query = $db->query("
SELECT pm.*, fu.username AS fromusername, tu.username AS tousername
FROM ".TABLE_PREFIX."privatemessages pm

Zeile 1909Zeile 1931
				if($mybb->input['exporttype'] == "txt")
{
$tofromusername = $message['tousername'];

				if($mybb->input['exporttype'] == "txt")
{
$tofromusername = $message['tousername'];

				}

				}

				else
{
$tofromusername = build_profile_link($message['tousername'], $tofromuid);

				else
{
$tofromusername = build_profile_link($message['tousername'], $tofromuid);

Zeile 1925Zeile 1947
		{
$tofromuid = $message['fromid'];
if($mybb->input['exporttype'] == "txt")

		{
$tofromuid = $message['fromid'];
if($mybb->input['exporttype'] == "txt")

			{

			{

				$tofromusername = $message['fromusername'];
}
else

				$tofromusername = $message['fromusername'];
}
else

			{

			{

				$tofromusername = build_profile_link($message['fromusername'], $tofromuid);
}


				$tofromusername = build_profile_link($message['fromusername'], $tofromuid);
}


Zeile 1941Zeile 1963
		}

if($tofromuid == 0)

		}

if($tofromuid == 0)

		{

		{

			$message['fromusername'] = $lang->mybb_engine;
}

if(!$message['toid'] && $message['folder'] == 3)
{
$message['tousername'] = $lang->not_sent;

			$message['fromusername'] = $lang->mybb_engine;
}

if(!$message['toid'] && $message['folder'] == 3)
{
$message['tousername'] = $lang->not_sent;

		}


		}


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

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

Zeile 1973Zeile 1995
				"me_username" => $mybb->user['username'],
"filter_badwords" => 1
);

				"me_username" => $mybb->user['username'],
"filter_badwords" => 1
);





			$message['message'] = $parser->parse_message($message['message'], $parser_options);
$message['subject'] = htmlspecialchars_uni($message['subject']);
}

			$message['message'] = $parser->parse_message($message['message'], $parser_options);
$message['subject'] = htmlspecialchars_uni($message['subject']);
}

Zeile 2132Zeile 2154
	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 2246Zeile 2274
	{
if($fid == 1)
{

	{
if($fid == 1)
{

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

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

		}

if($sortfield == "username")

		}

if($sortfield == "username")