Zeile 187 | Zeile 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 293 | Zeile 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 543 | Zeile 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 585 | Zeile 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 622 | Zeile 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 665 | Zeile 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
|