X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fmailbox_display.php;h=1a3b14c033b6325ec8571528e1b08cc4010ca3c1;hb=018d3a38f5a55afa12b319a6608528143753be93;hp=5170d5d3e29b1e07ba1586b9c7e52d368cff5505;hpb=86419c0b6313322da3972835c9f4727b720ece25;p=squirrelmail.git
diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php
index 5170d5d3..1a3b14c0 100644
--- a/functions/mailbox_display.php
+++ b/functions/mailbox_display.php
@@ -349,6 +349,7 @@ function showMessagesForMailbox($imapConnection, $mailbox, $num_msgs,
if ($auto_expunge == true) {
$exp_cnt = sqimap_mailbox_expunge($imapConnection, $mailbox, false, '');
$mbxresponse['EXISTS'] = $mbxresponse['EXISTS'] - $exp_cnt;
+ $num_msgs = $mbxresponse['EXISTS'];
}
if ($mbxresponse['EXISTS']>0) {
@@ -433,7 +434,9 @@ function showMessagesForMailbox($imapConnection, $mailbox, $num_msgs,
} // switch
} /* if exists > 0 */
- $end_msg = getEndMessage(&$start_msg, $show_num, $num_msgs);
+ $res = getEndMessage($start_msg, $show_num, $num_msgs);
+ $start_msg = $res[0];
+ $end_msg = $res[1];
$paginator_str = get_paginator_str($mailbox, $start_msg, $end_msg,
$num_msgs, $show_num, $sort);
@@ -446,12 +449,14 @@ function showMessagesForMailbox($imapConnection, $mailbox, $num_msgs,
$msg_cnt_str, $paginator_str, $start_msg);
+ echo '
';
printHeader($mailbox, $srt, $color, !$thread_sort_messages);
displayMessageArray($imapConnection, $num_msgs, $start_msg,
$msort, $mailbox, $sort, $color, $show_num,0,0);
mail_message_listing_end($num_msgs, $paginator_str, $msg_cnt_str, $color);
+ echo ' |
';
/**
* TODO: Switch to using $_SESSION[] whenever we ditch the 4.0.x series.
@@ -565,7 +570,9 @@ function displayMessageArray($imapConnection, $num_msgs, $start_msg,
$indent_array, $thread_sort_messages, $allow_server_sort,
$server_sort_order, $PHP_SELF;
- $end_msg = getEndMessage(&$start_msg, $show_num, $num_msgs);
+ $res = getEndMessage($start_msg, $show_num, $num_msgs);
+ $start_msg = $res[0];
+ $end_msg = $res[1];
$urlMailbox = urlencode($mailbox);
@@ -697,27 +704,32 @@ function mail_message_listing_beginning ($imapConnection,
. html_tag( 'td' ,'' , 'left', $color[0], '' )
. html_tag( 'table' ,'' , '', $color[0], 'border="0" width="100%" cellpadding="0" cellspacing="0"' )
. html_tag( 'tr',
- getSmallStringCell(_("Move Selected To:"), 'left') .
+ getSmallStringCell(_("Move Selected To"), 'left') .
getSmallStringCell(_("Transform Selected Messages"), 'right')
)
. html_tag( 'tr' ) ."\n"
. html_tag( 'td', '', 'left', '', 'valign="middle" nowrap' );
getMbxList($imapConnection);
- echo getButton('SUBMIT', 'moveButton',_("Move")) . ' '."\n";
- echo getButton('SUBMIT', 'attache',_("Forward")) . ' '."\n";
+ echo getButton('SUBMIT', 'moveButton',_("Move")) . "\n";
+ echo getButton('SUBMIT', 'attache',_("Forward")) . "\n";
echo " \n"
. html_tag( 'td', '', 'right', '', 'nowrap' );
if (!$auto_expunge) {
echo getButton('SUBMIT', 'expungeButton',_("Expunge"))
- .' ' . _("mailbox") . ' '."\n";
+ .' ' . _("mailbox") . "\n";
}
- echo getButton('SUBMIT', 'markRead',_("Read")) ."\n";
- echo getButton('SUBMIT', 'markUnread',_("Unread")) ."\n";
- echo getButton('SUBMIT', 'delete',_("Delete")) .' '."\n";
- echo '';
+ echo getButton('SUBMIT', 'markRead',_("Read"));
+ echo getButton('SUBMIT', 'markUnread',_("Unread"));
+ echo getButton('SUBMIT', 'delete',_("Delete")) ." \n";
+ if (!strpos($PHP_SELF,'mailbox')) {
+ $location = $PHP_SELF.'?mailbox=INBOX&startMessage=1';
+ } else {
+ $location = $PHP_SELF;
+ }
+ echo '';
echo "\n"
. " \n";
@@ -792,7 +804,7 @@ function mail_message_listing_end($num_msgs, $paginator_str, $msg_cnt_str, $colo
function printHeader($mailbox, $sort, $color, $showsort=true) {
global $index_order;
- echo html_tag( 'table' ,'' , '', '', 'border="0" width="100%" cellpadding="1" cellspacing="0"' );
+ echo html_tag( 'table' ,'' , '', $color[4], 'border="0" width="100%" cellpadding="1" cellspacing="0"' );
echo html_tag( 'tr' ,'' , 'center', $color[5] );
for ($i=1; $i <= count($index_order); $i++) {
switch ($index_order[$i]) {
@@ -946,6 +958,11 @@ function get_msgcnt_str($start_msg, $end_msg, $num_msgs) {
function get_paginator_link($box, $start_msg, $use, $text) {
global $PHP_SELF;
+ $result = "$text";
+ return ($result);
+/*
if (preg_match('/^(.+)\?.+$/',$PHP_SELF,$regs)) {
$source_url = $regs[1];
} else {
@@ -956,6 +973,7 @@ function get_paginator_link($box, $start_msg, $use, $text) {
. "&startMessage=$start_msg&mailbox=$box\" "
. "TARGET=\"right\">$text";
return ($result);
+*/
}
/*
@@ -1160,6 +1178,7 @@ function get_paginator_str($box, $start_msg, $end_msg, $num_msgs,
}
function processSubject($subject) {
+ global $languages, $squirrelmail_language;
/* Shouldn't ever happen -- caught too many times in the IMAP functions */
if ($subject == '')
return _("(no subject)");
@@ -1187,6 +1206,11 @@ function processSubject($subject) {
return $subject;
}
+ if (isset($languages[$squirrelmail_language]['XTRA_CODE']) &&
+ function_exists($languages[$squirrelmail_language]['XTRA_CODE'])) {
+ return $languages[$squirrelmail_language]['XTRA_CODE']('strimwidth', $subject, $trim_val);
+ }
+
return substr($subject, 0, $trim_val) . '...';
}
@@ -1218,7 +1242,7 @@ return '';
function getSmallStringCell($string, $align) {
return html_tag( 'td',
- '' . $string . ': ',
+ '' . $string . ': ',
$align,
'',
'nowrap' );
@@ -1237,7 +1261,7 @@ function getEndMessage($start_msg, $show_num, $num_msgs) {
$start_msg = 1;
}
}
- return $end_msg;
+ return (array($start_msg,$end_msg));
}
function handleAsSent($mailbox) {