From: Michael M Slusarz Date: Thu, 9 Jul 2009 22:54:40 +0000 (-0600) Subject: Use Horde_String::truncate(). X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=bb4e8422e365f957792d2c1e17953bb0227c17cb;p=horde.git Use Horde_String::truncate(). --- diff --git a/imp/compose-dimp.php b/imp/compose-dimp.php index 31561338c..24571602e 100644 --- a/imp/compose-dimp.php +++ b/imp/compose-dimp.php @@ -177,10 +177,7 @@ if (count($_POST)) { } if ($sent && $prefs->getValue('compose_confirm')) { - $notify_text = (Horde_String::length($header['subject']) > 100) - ? Horde_String::substr($header['subject'], 0, 100) . ' ...' - : $header['subject']; - $notification->push(empty($header['subject']) ? _("Message sent successfully.") : sprintf(_("Message \"%s\" sent successfully."), $notify_text), 'horde.success'); + $notification->push(empty($header['subject']) ? _("Message sent successfully.") : sprintf(_("Message \"%s\" sent successfully."), Horde_String::truncate($header['subject'])), 'horde.success'); } /* Update maillog information. */ diff --git a/imp/search.php b/imp/search.php index b87d674e8..64cdfc21d 100644 --- a/imp/search.php +++ b/imp/search.php @@ -172,10 +172,7 @@ $saved_searches = $imp_search->getSearchQueries(); if (!empty($saved_searches)) { $ss = array(); foreach ($saved_searches as $key => $val) { - if (Horde_String::length($val) > 100) { - $val = Horde_String::substr($val, 0, 100) . ' ...'; - } - $ss[] = array('val' => htmlspecialchars($key), 'text' => htmlspecialchars($val)); + $ss[] = array('val' => htmlspecialchars($key), 'text' => htmlspecialchars(Horde_String::truncate($val))); } $t->set('saved_searches', $ss); }