Truncate successful compose notification messages
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 26 Jun 2009 05:50:07 +0000 (23:50 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 26 Jun 2009 08:05:43 +0000 (02:05 -0600)
imp/compose-dimp.php

index f26d183..4b0d279 100644 (file)
@@ -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. */