}
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. */
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);
}