*/
function findNextMessage() {
global $msort, $currentArrayIndex, $msgs, $sort,
- $allow_thread_sort, $allow_server_sort,
+ $thread_sort_messages, $allow_server_sort,
$server_sort_array;
+ if (!is_array($server_sort_array)) {
+ $thread_sort_messages = 0;
+ $allow_server_sort = FALSE;
+ }
$result = -1;
- if ($allow_thread_sort == true || $allow_server_sort == true) {
+ if ($thread_sort_messages == 1 || $allow_server_sort == TRUE) {
reset($server_sort_array);
while(list($key, $value) = each ($server_sort_array)) {
if ($currentArrayIndex == $value) {
}
}
}
- elseif ($sort == 6 && $allow_server_sort != true &&
- $allow_thread_sort != true) {
+ elseif ($sort == 6 && $allow_server_sort != TRUE &&
+ $thread_sort_messages != 1) {
if ($currentArrayIndex != 1) {
$result = $currentArrayIndex - 1;
}
}
- elseif ($allow_server_sort != true && $allow_thread_sort != true) {
+ elseif ($allow_server_sort != TRUE && $thread_sort_messages != 1 ) {
if (!is_array($msort)) {
return -1;
}
/** returns the index of the previous message from the array. */
function findPreviousMessage() {
global $msort, $currentArrayIndex, $sort, $msgs, $imapConnection,
- $mailbox, $data_dir, $username, $allow_thread_sort,
+ $mailbox, $data_dir, $username, $thread_sort_messages,
$allow_server_sort, $server_sort_array;
$result = -1;
- if ($allow_thread_sort == true || $allow_server_sort == TRUE) {
+ if (!is_array($server_sort_array)) {
+ $thread_sort_messages = 0;
+ $allow_server_sort = FALSE;
+ }
+ if ($thread_sort_messages == 1 || $allow_server_sort == TRUE) {
reset($server_sort_array);
while(list($key, $value) = each ($server_sort_array)) {
if ($currentArrayIndex == $value) {
}
}
elseif ($sort == 6 && $allow_server_sort != TRUE &&
- $allow_thread_sort != true) {
+ $thread_sort_messages != 1) {
$numMessages = sqimap_get_num_messages($imapConnection, $mailbox);
if ($currentArrayIndex != $numMessages) {
$result = $currentArrayIndex + 1;
}
}
- elseif ($allow_thread_sort != true && $allow_server_sort != TRUE) {
+ elseif ($thread_sort_messages != 1 && $allow_server_sort != TRUE) {
if (!is_array($msort)) {
return -1;
}
$subject = $header->subject;
$now = getLongDateString( time() );
+ set_my_charset();
+
$body = _("Your message") . "\r\n\r\n" .
"\t" . _("To:") . ' ' . $to . "\r\n" .
"\t" . _("Subject:") . ' ' . $subject . "\r\n" .
$rem_attachments[] = $info;
}
}
- $attachments = rem_attachments;
+ $attachments = $rem_attachments;
}
function formatRecipientString($recipients, $item ) {
}
if ($mailbox == $sent_folder) {
echo '| <A HREF="' . $base_uri .
- "src/compose.php?mailbox=$mailbox&identity=$identity&send_to=$url_to_string&send_to_cc=$url_cc_string&send_to_bcc=$url_bcc_string&subject=$url_subj&mailprio=$priority_level&draft_id=$passed_id&ent_num=$ent_num" . '"';
+ "src/compose.php?mailbox=$mailbox&identity=$identity&send_to=$url_to_string&send_to_cc=$url_cc_string&send_to_bcc=$url_bcc_string&subject=$url_subj&mailprio=$priority_level&ent_num=$ent_num" . '"';
if ($compose_new_win == '1') {
echo ' TARGET="compose_window" onClick="comp_in_new()"';
}
_("The message sender has requested a response to indicate that you have read this message. Would you like to send a receipt?") .
"\")) { \n" .
" window.location=($url); \n" .
- ' window.reload()' . "\n" .
+ ' window.location.reload()' . "\n" .
' }' . "\n" .
'// -->' . "\n" .
'</script>' . "\n";