Vergleich inc/datahandlers/pm.php - 1.8.35 - 1.8.38

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 126Zeile 126
		// Return if we've already validated
if(!empty($pm['sender']))
{

		// Return if we've already validated
if(!empty($pm['sender']))
{

 
			return true;
}

if($pm['fromid'] <= 0)
{
$pm['sender'] = array(
"uid" => 0,
"username" => ''
);


			return true;
}


			return true;
}


Zeile 188Zeile 198
				if(empty($pm[$recipient_type]))
{
if($recipient_type == 'to' && empty($pm['saveasdraft']))

				if(empty($pm[$recipient_type]))
{
if($recipient_type == 'to' && empty($pm['saveasdraft']))

					{

					{

						$this->set_error("no_recipients");
return false;
}
continue;
}

						$this->set_error("no_recipients");
return false;
}
continue;
}





				$recipientUsernames = array_map(array($db, 'escape_string'), $pm[$recipient_type]);
$recipientUsernames = "'".implode("','", $recipientUsernames)."'";


				$recipientUsernames = array_map(array($db, 'escape_string'), $pm[$recipient_type]);
$recipientUsernames = "'".implode("','", $recipientUsernames)."'";


Zeile 205Zeile 215
				while($user = $db->fetch_array($query))
{
if($recipient_type == "bcc")

				while($user = $db->fetch_array($query))
{
if($recipient_type == "bcc")

					{
$user['bcc'] = 1;
}

					{
$user['bcc'] = 1;
}


$recipients[] = $user;
$validUsernames[] = $user['username'];


$recipients[] = $user;
$validUsernames[] = $user['username'];

Zeile 247Zeile 257
						return false;
}
continue;

						return false;
}
continue;

				}

				}


$recipientUids = "'".implode("','", $pm[$recipient_type])."'";



$recipientUids = "'".implode("','", $pm[$recipient_type])."'";


Zeile 284Zeile 294
			return false;
}


			return false;
}


		$sender_permissions = user_permissions($pm['fromid']);

// Are we trying to send this message to more users than the permissions allow?
if($sender_permissions['maxpmrecipients'] > 0 && count($recipients) > $sender_permissions['maxpmrecipients'] && $this->admin_override != true)

		if($pm['fromid'] > 0)




		{

		{

			$this->set_error("too_many_recipients", array($sender_permissions['maxpmrecipients']));







			$sender_permissions = user_permissions($pm['fromid']);

// Are we trying to send this message to more users than the permissions allow?
if($sender_permissions['maxpmrecipients'] > 0 && count($recipients) > $sender_permissions['maxpmrecipients'] && $this->admin_override != true)
{
$this->set_error("too_many_recipients", array($sender_permissions['maxpmrecipients']));
}

		}

// Now we're done with that we loop through each recipient

		}

// Now we're done with that we loop through each recipient

Zeile 302Zeile 315
			// See if the sender is on the recipients ignore list and that either
// - admin_override is set or
// - sender is an administrator

			// See if the sender is on the recipients ignore list and that either
// - admin_override is set or
// - sender is an administrator

			if($this->admin_override != true && $sender_permissions['canoverridepm'] != 1)

			if($this->admin_override != true && empty($sender_permissions['canoverridepm']))

			{
if(!empty($user['ignorelist']) && strpos(','.$user['ignorelist'].',', ','.$pm['fromid'].',') !== false)
{

			{
if(!empty($user['ignorelist']) && strpos(','.$user['ignorelist'].',', ','.$pm['fromid'].',') !== false)
{

Zeile 324Zeile 337
			}

// Check to see if the user has reached their private message quota - if they have, email them.

			}

// Check to see if the user has reached their private message quota - if they have, email them.

			if($recipient_permissions['pmquota'] != 0 && $user['totalpms'] >= $recipient_permissions['pmquota'] && $sender_permissions['cancp'] != 1 && empty($pm['saveasdraft']) && !$this->admin_override)

			if($recipient_permissions['pmquota'] != 0 && $user['totalpms'] >= $recipient_permissions['pmquota'] && empty($sender_permissions['cancp']) && empty($pm['saveasdraft']) && !$this->admin_override)

			{
if(trim($user['language']) != '' && $lang->language_exists($user['language']))
{

			{
if(trim($user['language']) != '' && $lang->language_exists($user['language']))
{

Zeile 404Zeile 417
		$pm = &$this->data;

// Check if post flooding is enabled within MyBB or if the admin override option is specified.

		$pm = &$this->data;

// Check if post flooding is enabled within MyBB or if the admin override option is specified.

		if($mybb->settings['pmfloodsecs'] > 0 && $pm['fromid'] != 0 && $this->admin_override == false && !is_moderator(0, '', $pm['fromid']))

		if($mybb->settings['pmfloodsecs'] > 0 && $pm['fromid'] > 0 && $this->admin_override == false && !is_moderator(0, '', $pm['fromid']))

		{
// Fetch the senders profile data.
$sender = get_user($pm['fromid']);

		{
// Fetch the senders profile data.
$sender = get_user($pm['fromid']);

Zeile 583Zeile 596
		$draftcheck = $db->fetch_array($query);

// This PM was previously a draft

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

// This PM was previously a draft

		if(!empty($draftcheck['pmid']))

		if($draftcheck)

		{
if($draftcheck['deletetime'])
{

		{
if($draftcheck['deletetime'])
{