From: Michael M Slusarz Date: Sat, 15 Aug 2009 20:03:59 +0000 (-0600) Subject: Use Horde_String::truncate() X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=0de2bdc9e00ef55e2b49171ef80a0192f276cb5c;p=horde.git Use Horde_String::truncate() --- diff --git a/chora/browsedir.php b/chora/browsedir.php index 4da275ba6..1de3b3205 100644 --- a/chora/browsedir.php +++ b/chora/browsedir.php @@ -118,10 +118,7 @@ if ($fileList) { $url = Chora::url('browsefile', $fileName, array('onb' => $onb)); $readableDate = Chora::readableTime($date); if ($log) { - $shortLog = str_replace("\n", ' ', trim(substr($log, 0, $conf['options']['shortLogLength'] - 1))); - if (strlen($log) > 80) { - $shortLog .= '...'; - } + $shortLog = Horde_String::truncate(str_replace("\n", ' ', trim($log)), $conf['options']['shortLogLength']); } require CHORA_TEMPLATES . '/directory/file.inc'; }