From: Michael M Slusarz Date: Thu, 28 Jan 2010 20:56:22 +0000 (-0700) Subject: Use Horde_String::abbreviate() X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=aa790c777ec08c9b1fe4e40e1b3574bf0a6d68db;p=horde.git Use Horde_String::abbreviate() --- 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. */