From 6b8a49c9f38f3b34e2ae11763d95535cf5c7c853 Mon Sep 17 00:00:00 2001 From: fidian Date: Tue, 30 Jan 2001 18:11:09 +0000 Subject: [PATCH] Couple warnings removed If subject line is over 55 chars, trims it and appends "..." git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@986 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_mailbox.php | 10 ++-------- functions/mailbox_display.php | 8 +++++++- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/functions/imap_mailbox.php b/functions/imap_mailbox.php index 72666d72..dad18801 100755 --- a/functions/imap_mailbox.php +++ b/functions/imap_mailbox.php @@ -163,13 +163,7 @@ return $boxes; } - /* patch from dave_michmerhuizen@yahoo.com - * allows case insensativity when sorting folders - */ - function _icmp ($a, $b) { - return strcasecmp($a, $b); - } - + /****************************************************************************** ** Returns sorted mailbox lists in several different ways. ** See comment on sqimap_mailbox_parse() for info about the returned array. @@ -210,7 +204,7 @@ } $sorted_lsub_ary = $new_ary; if (isset($sorted_lsub_ary)) { - usort($sorted_lsub_ary, "_icmp"); + usort($sorted_lsub_ary, "strcasecmp"); //sort($sorted_lsub_ary); } diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index d35acce3..6b74424b 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -112,7 +112,12 @@ $search_stuff = ""; echo "$flag$subject$flag_end$bold_end\n"; + echo ">$flag"; + if (strlen($subject) > 55) + echo substr($subject, 0, 50) . "..."; + else + echo $subject; + echo "$flag_end$bold_end\n"; break; case 5: # flags $stuff = false; @@ -427,6 +432,7 @@ $i = $startMessage; reset($msort); + $k = 0; do { $key = key($msort); next($msort); -- 2.25.1