From ecaf63527e8e4fea88480a896813419b3f5cefb5 Mon Sep 17 00:00:00 2001 From: kink Date: Mon, 21 Jul 2003 15:21:42 +0000 Subject: [PATCH] Fix that frequently subjects were displayed ending in ... even though nothing was trimmed. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5373 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mailbox_display.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index 7fb19893..e72c3c73 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -1221,7 +1221,13 @@ function processSubject($subject, $threadlevel = 0) { function_exists($languages[$squirrelmail_language]['XTRA_CODE'])) { return $languages[$squirrelmail_language]['XTRA_CODE']('strimwidth', $subject, $trim_val); } - return substr($subject, 0, $trim_val) . '...'; + + // only print '...' when we're actually dropping part of the subject + if(strlen($subject) < $trim_val) { + return $subject; + } else { + return substr($subject, 0, $trim_val) . '...'; + } } function getMbxList($imapConnection) { -- 2.25.1