' .
- _("Thread sorting is not supported by your IMAP server. Please report this to the system administrator.").
+ _("Thread sorting is not supported by your IMAP server.") . " " .
+ _("Please report this to the system administrator.").
'
' .
- _( "Server-side sorting is not supported by your IMAP server. Please report this to the system administrator.").
+ _( "Server-side sorting is not supported by your IMAP server.") . " " .
+ _("Please report this to the system administrator.").
'
@@ -537,7 +666,7 @@ function showMessagesForMailbox($imapConnection, $mailbox, $num_msgs,
@@ -558,6 +687,13 @@ function showMessagesForMailbox($imapConnection, $mailbox, $num_msgs,
//echo("elapsed time = $t seconds\n");
}
+/**
+ * FIXME: Undocumented function
+ *
+ * @param array $messages
+ * @param integer $sort sorting order
+ * @return array
+ */
function calc_msort($msgs, $sort) {
/*
@@ -594,12 +730,33 @@ function calc_msort($msgs, $sort) {
return $msort;
}
+/**
+ * FIXME: Undocumented function
+ *
+ * @param mixed $imapConnection
+ * @param mixed $id
+ * @param mixed $count
+ * @param bool $show_num
+ */
function fillMessageArray($imapConnection, $id, $count, $show_num=false) {
return sqimap_get_small_header_list($imapConnection, $id, $show_num);
}
-/* Generic function to convert the msgs array into an HTML table. */
+/**
+ * Generic function to convert the msgs array into an HTML table.
+ *
+ * @param mixed $imapConnection
+ * @param mixed $num_msgs
+ * @param mixed $start_msg
+ * @param mixed $msort
+ * @param string $mailbox mail folder name
+ * @param mixed $sort
+ * @param mixed $color
+ * @param mixed $show_num
+ * @param mixed $where
+ * @param mixed $what
+ */
function displayMessageArray($imapConnection, $num_msgs, $start_msg,
$msort, $mailbox, $sort, $color,
$show_num, $where=0, $what=0) {
@@ -642,10 +799,10 @@ function displayMessageArray($imapConnection, $num_msgs, $start_msg,
/* if there's no messages in this folder */
echo html_tag( 'tr',
html_tag( 'td',
- " " . _("THIS FOLDER IS EMPTY") . " ",
+ " " . _("THIS FOLDER IS EMPTY") . " ",
'center',
$color[4],
- 'COLSPAN="' . count($index_order) . '"'
+ 'colspan="' . count($index_order) . '"'
)
);
} elseif ($start_msg == $end_msg) {
@@ -686,25 +843,28 @@ function displayMessageArray($imapConnection, $num_msgs, $start_msg,
}
}
-/*
- * Displays the standard message list header. To finish the table,
- * you need to do a "
";
+/**
+ * Displays the standard message list header.
+ *
+ * To finish the table, you need to do a "";
*
- * $moveURL is the URL to submit the delete/move form to
- * $mailbox is the current mailbox
- * $sort is the current sorting method (-1 for no sorting available [searches])
- * $Message is a message that is centered on top of the list
- * $More is a second line that is left aligned
+ * @param mixed $imapConnection
+ * @param array $mbxresponse the array with the results of SELECT against the current mailbox
+ * @param string $mailbox the current mailbox
+ * @param mixed $sort the current sorting method (-1 for no sorting available [searches])
+ * @param mixed $msg_cnt_str
+ * @param mixed $paginator
+ * @param mixed $start_msg
*/
-
function mail_message_listing_beginning ($imapConnection,
+ $mbxresponse,
$mailbox = '', $sort = -1,
$msg_cnt_str = '',
$paginator = ' ',
$start_msg = 1) {
- global $color, $auto_expunge, $base_uri,
+ global $color, $auto_expunge, $base_uri, $show_flag_buttons,
$allow_server_sort, $server_sort_order,
- $PHP_SELF;
+ $PHP_SELF, $allow_thread_sort, $thread_sort_messages;
$php_self = $PHP_SELF;
/* fix for incorrect $PHP_SELF */
@@ -729,10 +889,27 @@ function mail_message_listing_beginning ($imapConnection,
$location = $php_self;
}
- $moveFields = '' .
- '' .
- ''.
- '';
+ $moveFields = addHidden('msg', $msg).
+ addHidden('mailbox', $mailbox).
+ addHidden('startMessage', $start_msg).
+ addHidden('location', $location);
+
+ /* build thread sorting links */
+ if ($allow_thread_sort == TRUE) {
+ if ($thread_sort_messages == 1 ) {
+ $set_thread = 2;
+ $thread_name = _("Unthread View");
+ } elseif ($thread_sort_messages == 0) {
+ $set_thread = 1;
+ $thread_name = _("Thread View");
+ }
+ $thread_link_str = '[' . $thread_name
+ . ']';
+ }
+ else
+ $thread_link_str ='';
/*
* This is the beginning of the message list table.
@@ -740,6 +917,7 @@ function mail_message_listing_beginning ($imapConnection,
*/
$safe_name = preg_replace("/[^0-9A-Za-z_]/", '_', $mailbox);
$form_name = "FormMsgs" . $safe_name;
+
echo '