From aa790c777ec08c9b1fe4e40e1b3574bf0a6d68db Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Thu, 28 Jan 2010 13:56:22 -0700 Subject: [PATCH] Use Horde_String::abbreviate() --- imp/lib/Folder.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/imp/lib/Folder.php b/imp/lib/Folder.php index 79fb49f8d..cf31ffc6f 100644 --- a/imp/lib/Folder.php +++ b/imp/lib/Folder.php @@ -135,11 +135,8 @@ class IMP_Folder continue; } - $abbrev = $label = str_repeat(' ', 2 * $ob['c']) . $ob['l']; - if (strlen($abbrev) > 26) { - $abbrev = Horde_String::substr($abbrev, 0, 10) . '...' . Horde_String::substr($abbrev, -13, 13); - } - $list[$ob['v']] = array('val' => $imaptree->isContainer($ob) ? '' : $ob['v'], 'label' => $label, 'abbrev' => $abbrev); + $label = str_repeat(' ', 2 * $ob['c']) . $ob['l']; + $list[$ob['v']] = array('val' => $imaptree->isContainer($ob) ? '' : $ob['v'], 'label' => $label, 'abbrev' => Horde_String::abbreviate($label, 30)); } /* Add the INBOX on top of list if not in the filter list. */ -- 2.11.0