From 0de2bdc9e00ef55e2b49171ef80a0192f276cb5c Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Sat, 15 Aug 2009 14:03:59 -0600 Subject: [PATCH] Use Horde_String::truncate() --- chora/browsedir.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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'; } -- 2.11.0