Vergleich inc/datahandlers/pm.php - 1.8.3 - 1.8.5

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 269Zeile 269
		// If we have one or more invalid recipients and we're not saving a draft, error
if(count($invalid_recipients) > 0)
{

		// If we have one or more invalid recipients and we're not saving a draft, error
if(count($invalid_recipients) > 0)
{

			$invalid_recipients = implode(", ", array_map("htmlspecialchars_uni", $invalid_recipients));

			$invalid_recipients = implode($lang->comma, array_map("htmlspecialchars_uni", $invalid_recipients));

			$this->set_error("invalid_recipients", array($invalid_recipients));
return false;
}

			$this->set_error("invalid_recipients", array($invalid_recipients));
return false;
}

Zeile 293Zeile 293
			// - sender is an administrator
if(($this->admin_override != true && $sender_permissions['cancp'] != 1) && $sender_permissions['canoverridepm'] != 1)
{

			// - sender is an administrator
if(($this->admin_override != true && $sender_permissions['cancp'] != 1) && $sender_permissions['canoverridepm'] != 1)
{

				$ignorelist = explode(",", $user['ignorelist']);
if(!empty($ignorelist) && in_array($pm['fromid'], $ignorelist))

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


				{

				{

					$this->set_error("recipient_is_ignoring", array($user['username']));

					$this->set_error('recipient_is_ignoring', array($user['username']));

				}

// Is the recipient only allowing private messages from their buddy list?

				}

// Is the recipient only allowing private messages from their buddy list?

				if($mybb->settings['allowbuddyonly'] == 1 && $user['receivefrombuddy'] == 1)

				if($mybb->settings['allowbuddyonly'] == 1 && $user['receivefrombuddy'] == 1 && !empty($user['buddylist']) && strpos(','.$user['buddylist'].',', ','.$pm['fromid'].',') === false)

				{

				{

					$buddylist = explode(",", $user['buddylist']);
if(!empty($buddylist) && !in_array($pm['fromid'], $buddylist))
{
$this->set_error("recipient_has_buddy_only", array(htmlspecialchars_uni($user['username'])));
}

					$this->set_error('recipient_has_buddy_only', array(htmlspecialchars_uni($user['username'])));





				}

// Can the recipient actually receive private messages based on their permissions or user setting?

				}

// Can the recipient actually receive private messages based on their permissions or user setting?

Zeile 571Zeile 566
			'smilieoff' => $pm['options']['disablesmilies'],
'receipt' => (int)$pm['options']['readreceipt'],
'readtime' => 0,

			'smilieoff' => $pm['options']['disablesmilies'],
'receipt' => (int)$pm['options']['readreceipt'],
'readtime' => 0,

			'recipients' => $db->escape_string(serialize($recipient_list)),

			'recipients' => $db->escape_string(my_serialize($recipient_list)),

			'ipaddress' => $db->escape_binary($pm['ipaddress'])
);


			'ipaddress' => $db->escape_binary($pm['ipaddress'])
);


Zeile 657Zeile 652

require_once MYBB_ROOT.'inc/class_parser.php';
$parser = new Postparser;


require_once MYBB_ROOT.'inc/class_parser.php';
$parser = new Postparser;

				$pm['message'] = $parser->text_parse_message($pm['message'], array('me_username' => $pm['sender']['username'], 'filter_badwords' => 1, 'safe_html' => 1));







			
$parser_options = array(
'me_username' => $pm['sender']['username'],
'filter_badwords' => 1
);

$pm['message'] = $parser->text_parse_message($pm['message'], $parser_options);


$emailmessage = $lang->sprintf($emailmessage, $recipient['username'], $pm['sender']['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $pm['message']);
$emailsubject = $lang->sprintf($emailsubject, $mybb->settings['bbname'], $pm['subject']);


$emailmessage = $lang->sprintf($emailmessage, $recipient['username'], $pm['sender']['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $pm['message']);
$emailsubject = $lang->sprintf($emailsubject, $mybb->settings['bbname'], $pm['subject']);