diff -c -r squirrelmail-1.2.5/functions/date.php squirrelmail-1.2.5-kjr/functions/date.phpa *** squirrelmail-1.2.5/functions/date.php Sat Jan 19 06:24:34 2002 --- squirrelmail-1.2.5-kjr/functions/date.php Thu Feb 28 16:48:02 2002 *************** *** 201,220 **** if ($midnight < $stamp) { /* Today */ if ( $hour_format == SMPREF_TIME_12HR ) { ! $date_format = _("g:i a"); } else { ! $date_format = _("G:i"); } } else if ($midnight - 518400 < $stamp) { /* This week */ if ( $hour_format == SMPREF_TIME_12HR ) { ! $date_format = _("D, g:i a"); } else { ! $date_format = _("D, G:i"); } } else { /* before this week */ ! $date_format = _("M j, Y"); } return( date_intl( $date_format, $stamp ) ); --- 201,220 ---- if ($midnight < $stamp) { /* Today */ if ( $hour_format == SMPREF_TIME_12HR ) { ! $date_format = _("h:i a"); } else { ! $date_format = _("H:i"); } } else if ($midnight - 518400 < $stamp) { /* This week */ if ( $hour_format == SMPREF_TIME_12HR ) { ! $date_format = _("D, h:i a"); } else { ! $date_format = _("D, H:i"); } } else { /* before this week */ ! $date_format = _("M d, Y"); } return( date_intl( $date_format, $stamp ) ); diff -c -r squirrelmail-1.2.5/functions/mailbox_display.php squirrelmail-1.2.5-kjr/functions/mailbox_display.php *** squirrelmail-1.2.5/functions/mailbox_display.php Mon Feb 18 20:43:19 2002 --- squirrelmail-1.2.5-kjr/functions/mailbox_display.php Thu Feb 28 16:48:57 2002 *************** *** 53,58 **** --- 53,66 ---- $senderName .= sqimap_find_displayable_name($sendersName[$index]); } + /* + * Trim senderName. + */ + $senderNameLen = 20; + if ( strlen($senderName) > $senderNameLen ) { + $senderName = rtrim(substr($senderName, 0, $senderNameLen)) . '...'; + } + if( $mailbox == 'None' ) { // $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); $boxes = sqimap_mailbox_list($imapConnection); *************** *** 125,140 **** for ($i=1; $i <= count($index_order); $i++) { switch ($index_order[$i]) { case 1: /* checkbox */ ! echo " \n"; break; case 2: /* from */ ! echo " $italic$bold$flag$fontstr$senderName$fontstr_end$flag_end$bold_end$italic_end\n"; break; case 3: /* date */ ! echo "
$bold$flag$fontstr".$msg["DATE_STRING"]."$fontstr_end$flag_end$bold_end
\n"; break; case 4: /* subject */ ! echo " $bold"; if (! isset($search_stuff)) { $search_stuff = ''; } echo "\n"; break; case 2: /* from */ ! echo " $italic$bold$flag$fontstr$senderName$fontstr_end$flag_end$bold_end$italic_end\n"; break; case 3: /* date */ ! echo " $bold$flag$fontstr".$msg["DATE_STRING"]."$fontstr_end$flag_end$bold_end\n"; break; case 4: /* subject */ ! echo " $bold"; if (! isset($search_stuff)) { $search_stuff = ''; } echo "\n"; if (isset($msg['FLAG_ANSWERED']) && $msg['FLAG_ANSWERED'] == true) { echo _("A") . "\n"; --- 158,164 ---- break; case 5: /* flags */ $stuff = false; ! echo " \n"; if (isset($msg['FLAG_ANSWERED']) && $msg['FLAG_ANSWERED'] == true) { echo _("A") . "\n"; *************** *** 181,187 **** echo "\n"; break; case 6: /* size */ ! echo " $bold$fontstr" . show_readable_size($msg['SIZE']) . "$fontstr_end$bold_end\n"; break; --- 189,195 ---- echo "\n"; break; case 6: /* size */ ! echo " $bold$fontstr" . show_readable_size($msg['SIZE']) . "$fontstr_end$bold_end\n"; break; *************** *** 901,920 **** } function processSubject($subject) { // Shouldn't ever happen -- caught too many times in the IMAP functions if ($subject == '') return _("(no subject)"); ! if (strlen($subject) <= 55) return $subject; $ent_strlen=strlen($subject); ! $trim_val=50; $ent_offset=0; // see if this is entities-encoded string // If so, Iterate through the whole string, find out // the real number of characters, and if more ! // than 55, substr with an updated trim value. while (($ent_loc = strpos($subject, '&', $ent_offset)) !== false && ($ent_loc_end = strpos($subject, ';', $ent_loc)) !== false) { --- 909,932 ---- } function processSubject($subject) { + + $subjectLen = 55; + $subjectLenTrim = 3; + // Shouldn't ever happen -- caught too many times in the IMAP functions if ($subject == '') return _("(no subject)"); ! if (strlen($subject) <= $subjectLen) return $subject; $ent_strlen=strlen($subject); ! $trim_val=$subjectLen - $subjectLenTrim; $ent_offset=0; // see if this is entities-encoded string // If so, Iterate through the whole string, find out // the real number of characters, and if more ! // than $subjectLen, substr with an updated trim value. while (($ent_loc = strpos($subject, '&', $ent_offset)) !== false && ($ent_loc_end = strpos($subject, ';', $ent_loc)) !== false) { *************** *** 923,929 **** $ent_offset = $ent_loc_end+1; } ! if ($ent_strlen <= 55) return $subject; return substr($subject, 0, $trim_val) . '...'; --- 935,941 ---- $ent_offset = $ent_loc_end+1; } ! if ($ent_strlen <= $subjectLen) return $subject; return substr($subject, 0, $trim_val) . '...'; diff -c -r squirrelmail-1.2.5/src/left_main.php squirrelmail-1.2.5-kjr/src/left_main.php *** squirrelmail-1.2.5/src/left_main.php Mon Feb 18 20:58:47 2002 --- squirrelmail-1.2.5-kjr/src/left_main.php Thu Feb 28 16:52:32 2002 *************** *** 94,100 **** if ($numMessages > 0) { $urlMailbox = urlencode($real_box); $line .= "\n\n" . ! "  ("._("empty").")" . ""; } } --- 94,100 ---- if ($numMessages > 0) { $urlMailbox = urlencode($real_box); $line .= "\n\n" . ! " ("._("empty").")" . ""; } } *************** *** 274,280 **** /* Next, display the refresh button. */ echo '('. ! _("refresh folder list") . ')
'; /* Lastly, display the folder list. */ if ( $collapse_folders ) { --- 274,280 ---- /* Next, display the refresh button. */ echo '('. ! _("refresh") . ')
'; /* Lastly, display the folder list. */ if ( $collapse_folders ) { *************** *** 304,310 **** $mblevel = substr_count($boxes[$i]['unformatted'], $delimiter) + 1; /* Create the prefix for the folder name and link. */ ! $prefix = str_repeat(' ',$mblevel); if (isset($collapse_folders) && $collapse_folders && $boxes[$i]['parent']) { $prefix = str_replace(' ',' ',substr($prefix,0,strlen($prefix)-2)). create_collapse_link($i) . ' '; --- 304,310 ---- $mblevel = substr_count($boxes[$i]['unformatted'], $delimiter) + 1; /* Create the prefix for the folder name and link. */ ! $prefix = str_repeat(' ',$mblevel); if (isset($collapse_folders) && $collapse_folders && $boxes[$i]['parent']) { $prefix = str_replace(' ',' ',substr($prefix,0,strlen($prefix)-2)). create_collapse_link($i) . ' ';