Zeile 44 | Zeile 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 327 | Zeile 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 393 | Zeile 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 578 | Zeile 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 813 | Zeile 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"';
|
}
| }
|
// Get list of recipients $recipients = my_unserialize($pm['recipients']);
| // Get list of recipients $recipients = my_unserialize($pm['recipients']);
|
Zeile 825 | Zeile 827 |
---|
if(isset($recipients['to']) && is_array($recipients['to'])) { foreach($recipients['to'] as $recipient)
|
if(isset($recipients['to']) && is_array($recipients['to'])) { foreach($recipients['to'] as $recipient)
|
{
| {
|
$recipient_list['to'][] = $recipient;
|
$recipient_list['to'][] = $recipient;
|
$recipientids .= $comma.$recipient; $comma = ',';
| $recipientids .= $comma.$recipient; $comma = ',';
|
} }
| } }
|
Zeile 843 | Zeile 845 |
---|
}
if(!empty($recipientids))
|
}
if(!empty($recipientids))
|
{
| {
|
$query = $db->simple_select("users", "uid, username", "uid IN ({$recipientids})"); while($user = $db->fetch_array($query)) {
| $query = $db->simple_select("users", "uid, username", "uid IN ({$recipientids})"); while($user = $db->fetch_array($query)) {
|
Zeile 988 | Zeile 990 |
---|
$pm = $db->fetch_array($query);
if(!$pm)
|
$pm = $db->fetch_array($query);
if(!$pm)
|
{
| {
|
error($lang->error_invalidpm); }
| error($lang->error_invalidpm); }
|
Zeile 1046 | Zeile 1048 |
---|
// Update PM notice value if this is our last unread PM if($mybb->user['unreadpms']-1 <= 0 && $mybb->user['pmnotice'] == 2)
|
// Update PM notice value if this is our last unread PM if($mybb->user['unreadpms']-1 <= 0 && $mybb->user['pmnotice'] == 2)
|
{
| {
|
$updated_user = array( "pmnotice" => 1 );
| $updated_user = array( "pmnotice" => 1 );
|
Zeile 1058 | Zeile 1060 |
---|
{ $reply_string = $lang->you_replied_on; $reply_date = my_date('relative', $pm['statustime']);
|
{ $reply_string = $lang->you_replied_on; $reply_date = my_date('relative', $pm['statustime']);
|
|
|
if((TIME_NOW - $pm['statustime']) < 3600) { // Relative string for the first hour
| if((TIME_NOW - $pm['statustime']) < 3600) { // Relative string for the first hour
|
Zeile 1066 | Zeile 1068 |
---|
}
$actioned_on = $lang->sprintf($reply_string, $reply_date);
|
}
$actioned_on = $lang->sprintf($reply_string, $reply_date);
|
eval("\$action_time = \"".$templates->get("private_read_action")."\";"); }
| eval("\$action_time = \"".$templates->get("private_read_action")."\";"); }
|
else if($pm['status'] == 4 && $pm['statustime']) { $forward_string = $lang->you_forwarded_on;
| else if($pm['status'] == 4 && $pm['statustime']) { $forward_string = $lang->you_forwarded_on;
|
Zeile 1081 | Zeile 1083 |
---|
$actioned_on = $lang->sprintf($forward_string, $forward_date); eval("\$action_time = \"".$templates->get("private_read_action")."\";"); }
|
$actioned_on = $lang->sprintf($forward_string, $forward_date); eval("\$action_time = \"".$templates->get("private_read_action")."\";"); }
|
|
|
$pm['userusername'] = $pm['username']; $pm['subject'] = htmlspecialchars_uni($parser->parse_badwords($pm['subject']));
if($pm['fromid'] == 0) { $pm['username'] = $lang->mybb_engine;
|
$pm['userusername'] = $pm['username']; $pm['subject'] = htmlspecialchars_uni($parser->parse_badwords($pm['subject']));
if($pm['fromid'] == 0) { $pm['username'] = $lang->mybb_engine;
|
}
| }
|
if(!$pm['username']) {
| if(!$pm['username']) {
|
Zeile 1098 | Zeile 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 1131 | Zeile 1133 |
---|
} // User is a normal recipient else if(in_array($recipient['uid'], $pm['recipients']['to']))
|
} // User is a normal recipient else if(in_array($recipient['uid'], $pm['recipients']['to']))
|
{
| {
|
$to_recipients[] = build_profile_link($recipient['username'], $recipient['uid']); }
|
$to_recipients[] = build_profile_link($recipient['username'], $recipient['uid']); }
|
}
| }
|
$bcc = ''; if(count($bcc_recipients) > 0)
| $bcc = ''; if(count($bcc_recipients) > 0)
|
Zeile 1142 | Zeile 1144 |
---|
$bcc_recipients = implode(', ', $bcc_recipients); $bcc_form_val = implode(',', $bcc_form_val); eval("\$bcc = \"".$templates->get("private_read_bcc")."\";");
|
$bcc_recipients = implode(', ', $bcc_recipients); $bcc_form_val = implode(',', $bcc_form_val); eval("\$bcc = \"".$templates->get("private_read_bcc")."\";");
|
}
| }
|
else { $bcc_form_val = '';
| else { $bcc_form_val = '';
|
Zeile 1152 | Zeile 1154 |
---|
if(count($to_recipients) > 1) { $replyall = true;
|
if(count($to_recipients) > 1) { $replyall = true;
|
}
| }
|
if(count($to_recipients) > 0)
|
if(count($to_recipients) > 0)
|
{
| {
|
$to_recipients = implode($lang->comma, $to_recipients); } else
| $to_recipients = implode($lang->comma, $to_recipients); } else
|
Zeile 1173 | Zeile 1175 |
---|
if($mybb->settings['pmquickreply'] != 0 && $mybb->user['showquickreply'] != 0 && $mybb->usergroup['cansendpms'] != 0 && $pm['fromid'] != 0 && $pm['folder'] != 3) { $trow = alt_trow();
|
if($mybb->settings['pmquickreply'] != 0 && $mybb->user['showquickreply'] != 0 && $mybb->usergroup['cansendpms'] != 0 && $pm['fromid'] != 0 && $pm['folder'] != 3) { $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 1217 | Zeile 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")."\";"); }
|
Zeile 1516 | Zeile 1533 |
---|
if($key > $highestid) { $highestid = $key;
|
if($key > $highestid) { $highestid = $key;
|
}
| }
|
$fid = (int)$key; // Use default language strings if empty or value is language string if($val == get_pm_folder_name($fid) || trim($val) == '') { $val = '';
|
$fid = (int)$key; // Use default language strings if empty or value is language string if($val == get_pm_folder_name($fid) || trim($val) == '') { $val = '';
|
} }
| } }
|
if($val != '' && trim($val) == '' && !(is_numeric($key) && $key <= 4)) { // If the name only contains whitespace and it's not a default folder, print an error
| if($val != '' && trim($val) == '' && !(is_numeric($key) && $key <= 4)) { // If the name only contains whitespace and it's not a default folder, print an error
|
Zeile 1533 | Zeile 1550 |
---|
}
if($val != '' || (is_numeric($key) && $key <= 4))
|
}
if($val != '' || (is_numeric($key) && $key <= 4))
|
{
| {
|
// If there is a name or if this is a default folder, save it $foldername = $db->escape_string(htmlspecialchars_uni($val));
| // If there is a name or if this is a default folder, save it $foldername = $db->escape_string(htmlspecialchars_uni($val));
|
Zeile 1549 | Zeile 1566 |
---|
{ error($lang->error_invalidpmfoldername); }
|
{ error($lang->error_invalidpmfoldername); }
|
}
| }
|
else { // Delete PMs from the folder $db->delete_query("privatemessages", "folder='$fid' AND uid='".$mybb->user['uid']."'"); } }
|
else { // Delete PMs from the folder $db->delete_query("privatemessages", "folder='$fid' AND uid='".$mybb->user['uid']."'"); } }
|
}
| }
|
$sql_array = array( "pmfolders" => $folders );
| $sql_array = array( "pmfolders" => $folders );
|
Zeile 1565 | Zeile 1582 |
---|
// Update PM count update_pm_count();
|
// Update PM count update_pm_count();
|
|
|
$plugins->run_hooks("private_do_folders_end");
redirect("private.php", $lang->redirect_pmfoldersupdated);
| $plugins->run_hooks("private_do_folders_end");
redirect("private.php", $lang->redirect_pmfoldersupdated);
|
Zeile 1581 | Zeile 1598 |
---|
$plugins->run_hooks("private_empty_start");
$foldersexploded = explode("$%%$", $mybb->user['pmfolders']);
|
$plugins->run_hooks("private_empty_start");
$foldersexploded = explode("$%%$", $mybb->user['pmfolders']);
|
$folderlist = $unread = '';
| $folderlist = '';
|
foreach($foldersexploded as $key => $folders) { $folderinfo = explode("**", $folders, 2);
|
foreach($foldersexploded as $key => $folders) { $folderinfo = explode("**", $folders, 2);
|
| $unread = '';
|
$fid = $folderinfo[0]; if($folderinfo[0] == "1") {
| $fid = $folderinfo[0]; if($folderinfo[0] == "1") {
|
Zeile 1782 | Zeile 1800 |
---|
$plugins->run_hooks("private_export_start");
$foldersexploded = explode("$%%$", $mybb->user['pmfolders']);
|
$plugins->run_hooks("private_export_start");
$foldersexploded = explode("$%%$", $mybb->user['pmfolders']);
|
$folder_name = $folder_id = '';
| $folderlist_folder = '';
|
foreach($foldersexploded as $key => $folders) { $folderinfo = explode("**", $folders, 2);
| foreach($foldersexploded as $key => $folders) { $folderinfo = explode("**", $folders, 2);
|
Zeile 2030 | Zeile 2048 |
---|
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 2218 | Zeile 2237 |
---|
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']);
|
}
| }
|
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 2281 | Zeile 2300 |
---|
");
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 2317 | Zeile 2337 |
---|
{ foreach($recipients['to'] as $uid) {
|
{ foreach($recipients['to'] as $uid) {
|
| if(!isset($cached_users[$uid])) { continue; }
|
$profilelink = get_profile_link($uid); $user = $cached_users[$uid]; $user['username'] = htmlspecialchars_uni($user['username']); $username = format_name($user['username'], $user['usergroup'], $user['displaygroup']); if(!$user['username'])
|
$profilelink = get_profile_link($uid); $user = $cached_users[$uid]; $user['username'] = htmlspecialchars_uni($user['username']); $username = format_name($user['username'], $user['usergroup'], $user['displaygroup']); if(!$user['username'])
|
{
| {
|
$username = $lang->na; } eval("\$to_users .= \"".$templates->get("private_multiple_recipients_user")."\";");
| $username = $lang->na; } eval("\$to_users .= \"".$templates->get("private_multiple_recipients_user")."\";");
|
Zeile 2332 | Zeile 2356 |
---|
eval("\$bcc_users = \"".$templates->get("private_multiple_recipients_bcc")."\";"); foreach($recipients['bcc'] as $uid) {
|
eval("\$bcc_users = \"".$templates->get("private_multiple_recipients_bcc")."\";"); foreach($recipients['bcc'] as $uid) {
|
| if(!isset($cached_users[$uid])) { continue; }
|
$profilelink = get_profile_link($uid); $user = $cached_users[$uid]; $user['username'] = htmlspecialchars_uni($user['username']);
| $profilelink = get_profile_link($uid); $user = $cached_users[$uid]; $user['username'] = htmlspecialchars_uni($user['username']);
|
Zeile 2397 | Zeile 2425 |
---|
}
if(!trim($message['subject']))
|
}
if(!trim($message['subject']))
|
{
| {
|
$message['subject'] = $lang->pm_no_subject; }
| $message['subject'] = $lang->pm_no_subject; }
|
Zeile 2414 | Zeile 2442 |
---|
$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 2456 | Zeile 2485 |
---|
{ $spaceused_severity = "high"; }
|
{ $spaceused_severity = "high"; }
|
|
|
$overhalf = round($spaceused, 0)."%"; if((int)$overhalf > 100) {
| $overhalf = round($spaceused, 0)."%"; if((int)$overhalf > 100) {
|