From d2b5b24c0650e5fa69a10b3774de730a788e6e13 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Thu, 25 Jun 2009 23:50:07 -0600 Subject: [PATCH] Truncate successful compose notification messages --- imp/compose-dimp.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/imp/compose-dimp.php b/imp/compose-dimp.php index f26d18390..4b0d279b9 100644 --- a/imp/compose-dimp.php +++ b/imp/compose-dimp.php @@ -180,7 +180,10 @@ if (count($_POST)) { } if ($sent && $prefs->getValue('compose_confirm')) { - $notification->push(empty($header['subject']) ? _("Message sent successfully.") : sprintf(_("Message \"%s\" sent successfully."), $header['subject']), 'horde.success'); + $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'); } /* Update maillog information. */ -- 2.11.0