Zeile 79 | Zeile 79 |
---|
eval("\$folderoplist_folder .= \"".$templates->get("private_jump_folders_folder")."\";"); eval("\$foldersearch_folder .= \"".$templates->get("private_jump_folders_folder")."\";"); }
|
eval("\$folderoplist_folder .= \"".$templates->get("private_jump_folders_folder")."\";"); eval("\$foldersearch_folder .= \"".$templates->get("private_jump_folders_folder")."\";"); }
|
| $from_fid = $mybb->input['fid'];
|
eval("\$folderjump = \"".$templates->get("private_jump_folders")."\";"); eval("\$folderoplist = \"".$templates->get("private_move")."\";");
| eval("\$folderjump = \"".$templates->get("private_jump_folders")."\";"); eval("\$folderoplist = \"".$templates->get("private_move")."\";");
|
Zeile 208 | Zeile 210 |
---|
$plugins->run_hooks("private_do_search_process");
$db->insert_query("searchlog", $searcharray);
|
$plugins->run_hooks("private_do_search_process");
$db->insert_query("searchlog", $searcharray);
|
|
|
// Sender sort won't work yet $sortby = array('subject', 'sender', 'dateline');
| // Sender sort won't work yet $sortby = array('subject', 'sender', 'dateline');
|
Zeile 276 | Zeile 278 |
---|
{ $mybb->settings['threadsperpage'] = 20; }
|
{ $mybb->settings['threadsperpage'] = 20; }
|
| $query = $db->simple_select("privatemessages", "COUNT(*) AS total", "pmid IN(".$db->escape_string($search['querycache']).")"); $pmscount = $db->fetch_field($query, "total");
|
// Work out pagination, which page we're at, as well as the limits. $perpage = $mybb->settings['threadsperpage'];
| // Work out pagination, which page we're at, as well as the limits. $perpage = $mybb->settings['threadsperpage'];
|
Zeile 283 | Zeile 288 |
---|
if($page > 0) { $start = ($page-1) * $perpage;
|
if($page > 0) { $start = ($page-1) * $perpage;
|
}
| $pages = ceil($pmscount / $perpage); if($page > $pages) { $start = 0; $page = 1; } }
|
else { $start = 0;
| else { $start = 0;
|
Zeile 301 | Zeile 312 |
---|
}
// Do Multi Pages
|
}
// Do Multi Pages
|
$query = $db->simple_select("privatemessages", "COUNT(*) AS total", "pmid IN(".$db->escape_string($search['querycache']).")"); $pmscount = $db->fetch_array($query);
if($upper > $pmscount) {
| if($upper > $pmscount) {
|
$upper = $pmscount; }
|
$upper = $pmscount; }
|
$multipage = multipage($pmscount['total'], $perpage, $page, "private.php?action=results&sid=".htmlspecialchars_uni($mybb->get_input('sid'))."&sortby={$sortby}&order={$order}");
| $multipage = multipage($pmscount, $perpage, $page, "private.php?action=results&sid=".htmlspecialchars_uni($mybb->get_input('sid'))."&sortby={$sortby}&order={$order}");
|
$messagelist = '';
|
$messagelist = '';
|
|
|
$icon_cache = $cache->read("posticons");
// Cache users in multiple recipients for sent & drafts folder
| $icon_cache = $cache->read("posticons");
// Cache users in multiple recipients for sent & drafts folder
|
Zeile 318 | Zeile 326 |
---|
$cached_users = $get_users = array(); $users_query = $db->simple_select("privatemessages", "recipients", "pmid IN(".$db->escape_string($search['querycache']).")", array('limit_start' => $start, 'limit' => $perpage, 'order_by' => $query_sortby, 'order_dir' => $order)); while($row = $db->fetch_array($users_query))
|
$cached_users = $get_users = array(); $users_query = $db->simple_select("privatemessages", "recipients", "pmid IN(".$db->escape_string($search['querycache']).")", array('limit_start' => $start, 'limit' => $perpage, 'order_by' => $query_sortby, 'order_dir' => $order)); while($row = $db->fetch_array($users_query))
|
{
| {
|
$recipients = my_unserialize($row['recipients']); if(is_array($recipients['to']) && count($recipients['to'])) {
| $recipients = my_unserialize($row['recipients']); if(is_array($recipients['to']) && count($recipients['to'])) {
|
Zeile 330 | Zeile 338 |
---|
$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
| $get_users = implode(',', array_unique($get_users));
// Grab info
|
Zeile 338 | Zeile 346 |
---|
{ $users_query = $db->simple_select("users", "uid, username, usergroup, displaygroup", "uid IN ({$get_users})"); while($user = $db->fetch_array($users_query))
|
{ $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; } }
| $cached_users[$user['uid']] = $user; } }
|
Zeile 429 | Zeile 437 |
---|
{ $tofromusername = $lang->mybb_engine; }
|
{ $tofromusername = $lang->mybb_engine; }
|
}
$tofromusername = build_profile_link($tofromusername, $tofromuid);
| }
$tofromusername = build_profile_link($tofromusername, $tofromuid);
|
$denyreceipt = '';
if($message['icon'] > 0 && $icon_cache[$message['icon']])
|
$denyreceipt = '';
if($message['icon'] > 0 && $icon_cache[$message['icon']])
|
{
| {
|
$icon = $icon_cache[$message['icon']]; $icon['path'] = str_replace("{theme}", $theme['imgdir'], $icon['path']); $icon['path'] = htmlspecialchars_uni($icon['path']); $icon['name'] = htmlspecialchars_uni($icon['name']); eval("\$icon = \"".$templates->get("private_messagebit_icon")."\";");
|
$icon = $icon_cache[$message['icon']]; $icon['path'] = str_replace("{theme}", $theme['imgdir'], $icon['path']); $icon['path'] = htmlspecialchars_uni($icon['path']); $icon['name'] = htmlspecialchars_uni($icon['name']); eval("\$icon = \"".$templates->get("private_messagebit_icon")."\";");
|
} else {
| } else {
|
$icon = '	';
|
$icon = '	';
|
}
if(!trim($message['subject'])) { $message['subject'] = $lang->pm_no_subject;
| }
if(!trim($message['subject'])) { $message['subject'] = $lang->pm_no_subject;
|
}
$message['subject'] = $parser->parse_badwords($message['subject']);
if(my_strlen($message['subject']) > 50)
|
}
$message['subject'] = $parser->parse_badwords($message['subject']);
if(my_strlen($message['subject']) > 50)
|
{
| {
|
$message['subject'] = htmlspecialchars_uni(my_substr($message['subject'], 0, 50)."..."); } else { $message['subject'] = htmlspecialchars_uni($message['subject']);
|
$message['subject'] = htmlspecialchars_uni(my_substr($message['subject'], 0, 50)."..."); } else { $message['subject'] = htmlspecialchars_uni($message['subject']);
|
}
| }
|
if($message['folder'] != "3") { $senddate = my_date('relative', $message['dateline']);
|
if($message['folder'] != "3") { $senddate = my_date('relative', $message['dateline']);
|
}
| }
|
else { $senddate = $lang->not_sent;
|
else { $senddate = $lang->not_sent;
|
}
| }
|
$foldername = $foldernames[$message['folder']];
| $foldername = $foldernames[$message['folder']];
|
Zeile 495 | Zeile 503 |
---|
if($db->num_rows($query) == 0) { eval("\$messagelist = \"".$templates->get("private_search_results_nomessages")."\";");
|
if($db->num_rows($query) == 0) { eval("\$messagelist = \"".$templates->get("private_search_results_nomessages")."\";");
|
}
| }
|
$plugins->run_hooks("private_results_end");
| $plugins->run_hooks("private_results_end");
|
Zeile 556 | Zeile 564 |
---|
// Attempt to see if this PM is a duplicate or not $to = array_map("trim", explode(",", $mybb->get_input('to')));
|
// Attempt to see if this PM is a duplicate or not $to = array_map("trim", explode(",", $mybb->get_input('to')));
|
| $to = array_unique($to); // Filter out any duplicates
|
$to_escaped = implode("','", array_map(array($db, 'escape_string'), array_map('my_strtolower', $to))); $time_cutoff = TIME_NOW - (5 * 60 * 60); $query = $db->query("
| $to_escaped = implode("','", array_map(array($db, 'escape_string'), array_map('my_strtolower', $to))); $time_cutoff = TIME_NOW - (5 * 60 * 60); $query = $db->query("
|
Zeile 590 | Zeile 599 |
---|
{ $pm['bcc'] = explode(",", $mybb->get_input('bcc')); $pm['bcc'] = array_map("trim", $pm['bcc']);
|
{ $pm['bcc'] = explode(",", $mybb->get_input('bcc')); $pm['bcc'] = array_map("trim", $pm['bcc']);
|
}
$mybb->input['options'] = $mybb->get_input('options', MyBB::INPUT_ARRAY);
if(!$mybb->usergroup['cantrackpms'])
| }
$mybb->input['options'] = $mybb->get_input('options', MyBB::INPUT_ARRAY);
if(!$mybb->usergroup['cantrackpms'])
|
{ $mybb->input['options']['readreceipt'] = false; }
| { $mybb->input['options']['readreceipt'] = false; }
|
Zeile 659 | Zeile 668 |
---|
if($mybb->usergroup['cansendpms'] == 0) { error_no_permission();
|
if($mybb->usergroup['cansendpms'] == 0) { error_no_permission();
|
}
| }
|
$plugins->run_hooks("private_send_start");
| $plugins->run_hooks("private_send_start");
|
Zeile 671 | Zeile 680 |
---|
if($mybb->settings['pmsallowsmilies'] != 0) { $smilieinserter = build_clickable_smilies();
|
if($mybb->settings['pmsallowsmilies'] != 0) { $smilieinserter = build_clickable_smilies();
|
}
| }
|
}
$lang->post_icon = $lang->message_icon;
|
}
$lang->post_icon = $lang->message_icon;
|
|
|
$posticons = get_post_icons(); $message = htmlspecialchars_uni($parser->parse_badwords($mybb->get_input('message'))); $subject = htmlspecialchars_uni($parser->parse_badwords($mybb->get_input('subject')));
|
$posticons = get_post_icons(); $message = htmlspecialchars_uni($parser->parse_badwords($mybb->get_input('message'))); $subject = htmlspecialchars_uni($parser->parse_badwords($mybb->get_input('subject')));
|
|
|
$optionschecked = array('signature' => '', 'disablesmilies' => '', 'savecopy' => '', 'readreceipt' => ''); $to = $bcc = '';
| $optionschecked = array('signature' => '', 'disablesmilies' => '', 'savecopy' => '', 'readreceipt' => ''); $to = $bcc = '';
|
Zeile 691 | Zeile 700 |
---|
$optionschecked['signature'] = 'checked="checked"'; } if(isset($options['disablesmilies']) && $options['disablesmilies'] == 1)
|
$optionschecked['signature'] = 'checked="checked"'; } if(isset($options['disablesmilies']) && $options['disablesmilies'] == 1)
|
{
| {
|
$optionschecked['disablesmilies'] = 'checked="checked"'; } if(isset($options['savecopy']) && $options['savecopy'] != 0)
| $optionschecked['disablesmilies'] = 'checked="checked"'; } if(isset($options['savecopy']) && $options['savecopy'] != 0)
|
Zeile 702 | Zeile 711 |
---|
{ $optionschecked['readreceipt'] = 'checked="checked"'; }
|
{ $optionschecked['readreceipt'] = 'checked="checked"'; }
|
$to = htmlspecialchars_uni($mybb->get_input('to')); $bcc = htmlspecialchars_uni($mybb->get_input('bcc'));
| $to = htmlspecialchars_uni(implode(', ', array_unique(array_map('trim', explode(',', $mybb->get_input('to')))))); $bcc = htmlspecialchars_uni(implode(', ', array_unique(array_map('trim', explode(',', $mybb->get_input('bcc'))))));
|
}
$preview = '';
| }
$preview = '';
|
Zeile 789 | Zeile 798 |
---|
$subject = htmlspecialchars_uni($parser->parse_badwords($pm['subject']));
if($pm['folder'] == "3")
|
$subject = htmlspecialchars_uni($parser->parse_badwords($pm['subject']));
if($pm['folder'] == "3")
|
{
| {
|
// message saved in drafts $mybb->input['uid'] = $pm['toid'];
| // message saved in drafts $mybb->input['uid'] = $pm['toid'];
|
Zeile 853 | Zeile 862 |
---|
$message = preg_replace('#^/me (.*)$#im', "* ".$pm['quotename']." \\1", $message);
require_once MYBB_ROOT."inc/functions_posting.php";
|
$message = preg_replace('#^/me (.*)$#im', "* ".$pm['quotename']." \\1", $message);
require_once MYBB_ROOT."inc/functions_posting.php";
|
|
|
if($mybb->settings['maxpmquotedepth'] != '0') { $message = remove_message_quotes($message, $mybb->settings['maxpmquotedepth']);
| if($mybb->settings['maxpmquotedepth'] != '0') { $message = remove_message_quotes($message, $mybb->settings['maxpmquotedepth']);
|
Zeile 922 | Zeile 931 |
---|
if($send_errors) {
|
if($send_errors) {
|
$to = htmlspecialchars_uni($mybb->get_input('to')); $bcc = htmlspecialchars_uni($mybb->get_input('bcc'));
| $to = htmlspecialchars_uni(implode(', ', array_unique(array_map('trim', explode(',', $mybb->get_input('to')))))); $bcc = htmlspecialchars_uni(implode(', ', array_unique(array_map('trim', explode(',', $mybb->get_input('bcc'))))));
|
}
// Load the auto complete javascript if it is enabled.
| }
// Load the auto complete javascript if it is enabled.
|
Zeile 1204 | Zeile 1213 |
---|
eval("\$private_send_tracking = \"".$templates->get("private_send_tracking")."\";"); }
|
eval("\$private_send_tracking = \"".$templates->get("private_send_tracking")."\";"); }
|
| $expaltext = (in_array("quickreply", $collapse)) ? "[+]" : "[-]";
|
eval("\$quickreply = \"".$templates->get("private_quickreply")."\";"); }
| eval("\$quickreply = \"".$templates->get("private_quickreply")."\";"); }
|
Zeile 1242 | Zeile 1252 |
---|
if($mybb->get_input('read_page') == "last") {
|
if($mybb->get_input('read_page') == "last") {
|
$page = $pages; }
if($page > $pages || $page <= 0) { $page = 1; }
if($page)
| $page = $pages; }
if($page > $pages || $page <= 0) { $page = 1; }
if($page)
|
{ $start = ($page-1) * $perpage; }
| { $start = ($page-1) * $perpage; }
|
Zeile 1264 | Zeile 1274 |
---|
$query = $db->query(" SELECT pm.pmid, pm.subject, pm.toid, pm.readtime, u.username as tousername
|
$query = $db->query(" SELECT pm.pmid, pm.subject, pm.toid, pm.readtime, u.username as tousername
|
FROM ".TABLE_PREFIX."privatemessages pm LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=pm.toid)
| FROM ".TABLE_PREFIX."privatemessages pm LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=pm.toid)
|
WHERE pm.receipt='2' AND pm.folder!='3' AND pm.status!='0' AND pm.fromid='".$mybb->user['uid']."' ORDER BY pm.readtime DESC LIMIT {$start}, {$perpage}
| WHERE pm.receipt='2' AND pm.folder!='3' AND pm.status!='0' AND pm.fromid='".$mybb->user['uid']."' ORDER BY pm.readtime DESC LIMIT {$start}, {$perpage}
|
Zeile 1277 | Zeile 1287 |
---|
$readmessage['profilelink'] = build_profile_link($readmessage['tousername'], $readmessage['toid']); $readdate = my_date('relative', $readmessage['readtime']); eval("\$readmessages .= \"".$templates->get("private_tracking_readmessage")."\";");
|
$readmessage['profilelink'] = build_profile_link($readmessage['tousername'], $readmessage['toid']); $readdate = my_date('relative', $readmessage['readtime']); eval("\$readmessages .= \"".$templates->get("private_tracking_readmessage")."\";");
|
}
| }
|
$stoptrackingread = ''; if(!empty($readmessages)) {
|
$stoptrackingread = ''; if(!empty($readmessages)) {
|
eval("\$stoptrackingread = \"".$templates->get("private_tracking_readmessage_stop")."\";"); }
if(!$readmessages) { eval("\$readmessages = \"".$templates->get("private_tracking_nomessage")."\";");
| eval("\$stoptrackingread = \"".$templates->get("private_tracking_readmessage_stop")."\";"); }
if(!$readmessages) { eval("\$readmessages = \"".$templates->get("private_tracking_nomessage")."\";");
|
}
$query = $db->simple_select("privatemessages", "COUNT(pmid) as unreadpms", "receipt='1' AND folder!='3' AND status='0' AND fromid='".$mybb->user['uid']."'");
| }
$query = $db->simple_select("privatemessages", "COUNT(pmid) as unreadpms", "receipt='1' AND folder!='3' AND status='0' AND fromid='".$mybb->user['uid']."'");
|
Zeile 1296 | Zeile 1306 |
---|
$page = $mybb->get_input('unread_page', MyBB::INPUT_INT); $pages = $postcount / $perpage; $pages = ceil($pages);
|
$page = $mybb->get_input('unread_page', MyBB::INPUT_INT); $pages = $postcount / $perpage; $pages = ceil($pages);
|
|
|
if($mybb->get_input('unread_page') == "last") { $page = $pages; }
if($page > $pages || $page <= 0)
|
if($mybb->get_input('unread_page') == "last") { $page = $pages; }
if($page > $pages || $page <= 0)
|
{ $page = 1; }
| { $page = 1; }
|
if($page) { $start = ($page-1) * $perpage;
| if($page) { $start = ($page-1) * $perpage;
|
Zeile 1367 | Zeile 1377 |
---|
if(!empty($mybb->input['readcheck'])) { foreach($mybb->input['readcheck'] as $key => $val)
|
if(!empty($mybb->input['readcheck'])) { foreach($mybb->input['readcheck'] as $key => $val)
|
{
| {
|
$sql_array = array( "receipt" => 0 );
| $sql_array = array( "receipt" => 0 );
|
Zeile 1880 | Zeile 1890 |
---|
if($mybb->get_input('exportunread', MyBB::INPUT_INT) != 1) { $wsql .= " AND pm.status!='0'";
|
if($mybb->get_input('exportunread', MyBB::INPUT_INT) != 1) { $wsql .= " AND pm.status!='0'";
|
}
| }
|
} $query = $db->query(" SELECT pm.*, fu.username AS fromusername, tu.username AS tousername
| } $query = $db->query(" SELECT pm.*, fu.username AS fromusername, tu.username AS tousername
|
Zeile 1943 | Zeile 1953 |
---|
if($tofromuid == 0) { $message['fromusername'] = $lang->mybb_engine;
|
if($tofromuid == 0) { $message['fromusername'] = $lang->mybb_engine;
|
}
| }
|
if(!$message['toid'] && $message['folder'] == 3) { $message['tousername'] = $lang->not_sent;
| if(!$message['toid'] && $message['folder'] == 3) { $message['tousername'] = $lang->not_sent;
|
Zeile 1953 | Zeile 1963 |
---|
$message['subject'] = $parser->parse_badwords($message['subject']); if($message['folder'] != "3") {
|
$message['subject'] = $parser->parse_badwords($message['subject']); if($message['folder'] != "3") {
|
$senddate = my_date($mybb->settings['dateformat'], $message['dateline']); $sendtime = my_date($mybb->settings['timeformat'], $message['dateline']);
| $senddate = my_date($mybb->settings['dateformat'], $message['dateline'], "", false); $sendtime = my_date($mybb->settings['timeformat'], $message['dateline'], "", false);
|
$senddate .= " $lang->at $sendtime"; } else
| $senddate .= " $lang->at $sendtime"; } else
|
Zeile 1986 | Zeile 1996 |
---|
if($mybb->input['exporttype'] == "csv") {
|
if($mybb->input['exporttype'] == "csv") {
|
$message['message'] = addslashes($message['message']); $message['subject'] = addslashes($message['subject']); $message['tousername'] = addslashes($message['tousername']); $message['fromusername'] = addslashes($message['fromusername']);
| $message['message'] = my_escape_csv($message['message']); $message['subject'] = my_escape_csv($message['subject']); $message['tousername'] = my_escape_csv($message['tousername']); $message['fromusername'] = my_escape_csv($message['fromusername']);
|
}
if(empty($donefolder[$message['folder']]))
| }
if(empty($donefolder[$message['folder']]))
|
Zeile 2011 | Zeile 2021 |
---|
} else {
|
} else {
|
$foldername = addslashes($folderinfo[1]);
| $foldername = my_escape_csv($folderinfo[1]);
|
} $donefolder[$message['folder']] = 1; }
| } $donefolder[$message['folder']] = 1; }
|
Zeile 2132 | Zeile 2142 |
---|
// Do Multi Pages $query = $db->simple_select("privatemessages", "COUNT(*) AS total", "uid='".$mybb->user['uid']."' AND folder='$folder'");
|
// Do Multi Pages $query = $db->simple_select("privatemessages", "COUNT(*) AS total", "uid='".$mybb->user['uid']."' AND folder='$folder'");
|
$pmscount = $db->fetch_array($query);
| $pmscount = $db->fetch_field($query, "total");
|
if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1) {
| if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1) {
|
Zeile 2145 | Zeile 2155 |
---|
if($page > 0) { $start = ($page-1) *$perpage;
|
if($page > 0) { $start = ($page-1) *$perpage;
|
| $pages = ceil($pmscount / $perpage); if($page > $pages) { $start = 0; $page = 1; }
|
} else {
| } else {
|
Zeile 2170 | Zeile 2186 |
---|
$page_url = "private.php?fid={$folder}"; }
|
$page_url = "private.php?fid={$folder}"; }
|
$multipage = multipage($pmscount['total'], $perpage, $page, $page_url);
| $multipage = multipage($pmscount, $perpage, $page, $page_url);
|
$messagelist = '';
$icon_cache = $cache->read("posticons");
| $messagelist = '';
$icon_cache = $cache->read("posticons");
|
Zeile 2290 | Zeile 2306 |
---|
{ // 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 || (isset($recipients['to']) && count($recipients['to']) == 1 && isset($recipients['bcc']) && count($recipients['bcc']) > 0))
|
{ foreach($recipients['to'] as $uid) {
| { foreach($recipients['to'] as $uid) {
|
Zeile 2399 | Zeile 2415 |
---|
}
$pmspacebar = '';
|
}
$pmspacebar = '';
|
if($mybb->usergroup['pmquota'] != '0' && $mybb->usergroup['cancp'] != 1)
| if($mybb->usergroup['pmquota'] != 0)
|
{ $query = $db->simple_select("privatemessages", "COUNT(*) AS total", "uid='".$mybb->user['uid']."'"); $pmscount = $db->fetch_array($query);
| { $query = $db->simple_select("privatemessages", "COUNT(*) AS total", "uid='".$mybb->user['uid']."'"); $pmscount = $db->fetch_array($query);
|
Zeile 2463 | Zeile 2479 |
---|
}
$limitwarning = '';
|
}
$limitwarning = '';
|
if($mybb->usergroup['pmquota'] != "0" && $pmscount['total'] >= $mybb->usergroup['pmquota'] && $mybb->usergroup['cancp'] != 1)
| if($mybb->usergroup['pmquota'] != 0 && $pmscount['total'] >= $mybb->usergroup['pmquota'])
|
{ eval("\$limitwarning = \"".$templates->get("private_limitwarning")."\";"); }
| { eval("\$limitwarning = \"".$templates->get("private_limitwarning")."\";"); }
|