Vergleich inc/datahandlers/pm.php - 1.8.17 - 1.8.37

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 187Zeile 187
				// No recipients? Skip query
if(empty($pm[$recipient_type]))
{

				// No recipients? Skip query
if(empty($pm[$recipient_type]))
{

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

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

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

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

Zeile 293Zeile 293
		}

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

		}

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

 
		$pm['recipients'] = array();

		foreach($recipients as $user)
{
// Collect group permissions for this recipient.

		foreach($recipients as $user)
{
// Collect group permissions for this recipient.

Zeile 543Zeile 544

$uid = 0;



$uid = 0;


		if(!is_array($pm['recipients']))



		// Build recipient list
$recipient_list = array();
if(isset($pm['recipients']) && is_array($pm['recipients']))

		{

		{

			$recipient_list = array();
}
else
{
// Build recipient list

 
			foreach($pm['recipients'] as $recipient)
{
if(!empty($recipient['bcc']))

			foreach($pm['recipients'] as $recipient)
{
if(!empty($recipient['bcc']))

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

// This PM was previously a draft

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

// This PM was previously a draft

		if($draftcheck['pmid'])

		if($draftcheck)

		{
if($draftcheck['deletetime'])
{
// This draft was a reply to a PM
$pm['pmid'] = $draftcheck['deletetime'];
$pm['do'] = "reply";

		{
if($draftcheck['deletetime'])
{
// This draft was a reply to a PM
$pm['pmid'] = $draftcheck['deletetime'];
$pm['do'] = "reply";

			}


			}


			// Delete the old draft as we no longer need it
$db->delete_query("privatemessages", "pmid='{$draftcheck['pmid']}'");
}

			// Delete the old draft as we no longer need it
$db->delete_query("privatemessages", "pmid='{$draftcheck['pmid']}'");
}

Zeile 622Zeile 620
		}

$this->pmid = array();

		}

$this->pmid = array();





		// Save a copy of the PM for each of our recipients
foreach($pm['recipients'] as $recipient)
{
// Send email notification of new PM if it is enabled for the recipient
$query = $db->simple_select("privatemessages", "dateline", "uid='".$recipient['uid']."' AND folder='1'", array('order_by' => 'dateline', 'order_dir' => 'desc', 'limit' => 1));
$lastpm = $db->fetch_array($query);

		// Save a copy of the PM for each of our recipients
foreach($pm['recipients'] as $recipient)
{
// Send email notification of new PM if it is enabled for the recipient
$query = $db->simple_select("privatemessages", "dateline", "uid='".$recipient['uid']."' AND folder='1'", array('order_by' => 'dateline', 'order_dir' => 'desc', 'limit' => 1));
$lastpm = $db->fetch_array($query);

			if($recipient['pmnotify'] == 1 && $recipient['lastactive'] > $lastpm['dateline'])

			if($recipient['pmnotify'] == 1 && (empty($lastpm['dateline']) || $recipient['lastactive'] > $lastpm['dateline']))

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

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

Zeile 665Zeile 663

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


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

			



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

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

Zeile 735Zeile 733
		// If we're saving a copy
if($pm['options']['savecopy'] != 0)
{

		// If we're saving a copy
if($pm['options']['savecopy'] != 0)
{

			if(isset($recipient_list['to']) && count($recipient_list['to']) == 1)

			if(isset($recipient_list['to']) && is_array($recipient_list['to']) && count($recipient_list['to']) == 1)

			{
$this->pm_insert_data['toid'] = $uid;
}

			{
$this->pm_insert_data['toid'] = $uid;
}