Vergleich private.php - 1.8.24 - 1.8.27

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 44Zeile 44

$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 327Zeile 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 393Zeile 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 578Zeile 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 813Zeile 815
			if($pm['smilieoff'] == 1)
{
$optionschecked['disablesmilies'] = 'checked="checked"';

			if($pm['smilieoff'] == 1)
{
$optionschecked['disablesmilies'] = 'checked="checked"';

			}

			}

			if($pm['receipt'])
{
$optionschecked['readreceipt'] = 'checked="checked"';

			if($pm['receipt'])
{
$optionschecked['readreceipt'] = 'checked="checked"';

Zeile 1098Zeile 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 1174Zeile 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 1217Zeile 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")."\";");
}





	$plugins->run_hooks("private_read_end");

eval("\$read = \"".$templates->get("private_read")."\";");
output_page($read);
}

	$plugins->run_hooks("private_read_end");

eval("\$read = \"".$templates->get("private_read")."\";");
output_page($read);
}





if($mybb->input['action'] == "tracking")
{
if(!$mybb->usergroup['cantrackpms'])

if($mybb->input['action'] == "tracking")
{
if(!$mybb->usergroup['cantrackpms'])

Zeile 1260Zeile 1277
	}

if($page > $pages || $page <= 0)

	}

if($page > $pages || $page <= 0)

	{

	{

		$page = 1;
}


		$page = 1;
}


Zeile 1285Zeile 1302
		LIMIT {$start}, {$perpage}
");
while($readmessage = $db->fetch_array($query))

		LIMIT {$start}, {$perpage}
");
while($readmessage = $db->fetch_array($query))

	{

	{

		$readmessage['subject'] = htmlspecialchars_uni($parser->parse_badwords($readmessage['subject']));
$readmessage['tousername'] = htmlspecialchars_uni($readmessage['tousername']);
$readmessage['profilelink'] = build_profile_link($readmessage['tousername'], $readmessage['toid']);

		$readmessage['subject'] = htmlspecialchars_uni($parser->parse_badwords($readmessage['subject']));
$readmessage['tousername'] = htmlspecialchars_uni($readmessage['tousername']);
$readmessage['profilelink'] = build_profile_link($readmessage['tousername'], $readmessage['toid']);

Zeile 1753Zeile 1770

$query = $db->simple_select("privatemessages", "*", "pmid='".$mybb->get_input('pmid', MyBB::INPUT_INT)."' AND uid='".$mybb->user['uid']."' AND folder='4'", array('order_by' => 'pmid'));
if($db->num_rows($query) == 1)


$query = $db->simple_select("privatemessages", "*", "pmid='".$mybb->get_input('pmid', MyBB::INPUT_INT)."' AND uid='".$mybb->user['uid']."' AND folder='4'", array('order_by' => 'pmid'));
if($db->num_rows($query) == 1)

	{

	{

		$db->delete_query("privatemessages", "pmid='".$mybb->get_input('pmid', MyBB::INPUT_INT)."'");
}
else

		$db->delete_query("privatemessages", "pmid='".$mybb->get_input('pmid', MyBB::INPUT_INT)."'");
}
else

	{

	{

		$sql_array = array(
"folder" => 4,
"deletetime" => TIME_NOW

		$sql_array = array(
"folder" => 4,
"deletetime" => TIME_NOW

Zeile 1783Zeile 1800

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


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

	foreach($foldersexploded as $key => $folders)

	foreach($foldersexploded as $key => $folders)

	{
$folderinfo = explode("**", $folders, 2);
$folderinfo[1] = get_pm_folder_name($folderinfo[0], $folderinfo[1]);

	{
$folderinfo = explode("**", $folders, 2);
$folderinfo[1] = get_pm_folder_name($folderinfo[0], $folderinfo[1]);

Zeile 1841Zeile 1858
				$wsql .= ">=";
}
$wsql .= "'$datecut'";

				$wsql .= ">=";
}
$wsql .= "'$datecut'";

		}

		}

		else
{
$wsql = "1=1";

		else
{
$wsql = "1=1";

Zeile 1858Zeile 1875
				{
$folderlst = '';
break;

				{
$folderlst = '';
break;

				}

				}

				else
{
if(!$folderlst)

				else
{
if(!$folderlst)

Zeile 1869Zeile 1886
					{
$folderlst .= ",'$val'";
}

					{
$folderlst .= ",'$val'";
}

				}
}

				}
}

			if($folderlst)
{
$folderlst .= ")";

			if($folderlst)
{
$folderlst .= ")";

Zeile 1878Zeile 1895
			$wsql .= "$folderlst";
}
else

			$wsql .= "$folderlst";
}
else

		{

		{

			error($lang->error_pmnoarchivefolders);
}


			error($lang->error_pmnoarchivefolders);
}


Zeile 1900Zeile 1917
	{
error($lang->error_nopmsarchive);
}

	{
error($lang->error_nopmsarchive);
}





	$mybb->input['exporttype'] = $mybb->get_input('exporttype');

$pmsdownload = $ids = '';

	$mybb->input['exporttype'] = $mybb->get_input('exporttype');

$pmsdownload = $ids = '';

Zeile 1987Zeile 2004
		{
$message['message'] = str_replace("\r\n", "\n", $message['message']);
$message['message'] = str_replace("\n", "\r\n", $message['message']);

		{
$message['message'] = str_replace("\r\n", "\n", $message['message']);
$message['message'] = str_replace("\n", "\r\n", $message['message']);

		}

		}


if($mybb->input['exporttype'] == "csv")
{


if($mybb->input['exporttype'] == "csv")
{

Zeile 2030Zeile 2047
	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 2133Zeile 2151
	}
$orderarrow = $sortsel = array('subject' => '', 'username' => '', 'dateline' => '');
$sortsel[$sortby] = "selected=\"selected\"";

	}
$orderarrow = $sortsel = array('subject' => '', 'username' => '', 'dateline' => '');
$sortsel[$sortby] = "selected=\"selected\"";





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

// Do Multi Pages

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

// Do Multi Pages

Zeile 2147Zeile 2165
	$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)

	{

	{

		$mybb->settings['threadsperpage'] = 20;
}


		$mybb->settings['threadsperpage'] = 20;
}


Zeile 2162Zeile 2180
		{
$start = 0;
$page = 1;

		{
$start = 0;
$page = 1;

		}

		}

	}
else
{

	}
else
{

Zeile 2221Zeile 2239
			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']))

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

			{

			{

				$get_users = array_merge($get_users, $recipients['bcc']);

				$get_users = array_merge($get_users, $recipients['bcc']);

			}
}

			}
}


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

// Grab info
if($get_users)


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

// Grab info
if($get_users)

		{

		{

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

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

		}
}

		}
}


if($folder == 2 || $folder == 3)
{
if($sortfield == "username")
{
$pm = "tu.";


if($folder == 2 || $folder == 3)
{
if($sortfield == "username")
{
$pm = "tu.";

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

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

	else
{
if($fid == 1)

	else
{
if($fid == 1)

		{

		{

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

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

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

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

		}

		}

		else
{
$pm = "pm.";

		else
{
$pm = "pm.";

Zeile 2281Zeile 2299
	");

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 2397Zeile 2416
			}

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

			}

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

			{

			{

				$message['subject'] = $lang->pm_no_subject;
}


				$message['subject'] = $lang->pm_no_subject;
}


Zeile 2414Zeile 2433
			$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 2456Zeile 2476
			{
$spaceused_severity = "high";
}

			{
$spaceused_severity = "high";
}

			



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

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