[dev] Some diverse patches

Jon Parise jon at horde.org
Fri Jan 2 10:05:02 PST 2004


On Fri, Jan 02, 2004 at 11:55:09AM -0500, Rick Emery wrote:

> Index: summary.php
> ===================================================================
> RCS file: /repository/imp/lib/Block/summary.php,v
> retrieving revision 1.25
> diff -u -r1.25 summary.php
> --- summary.php	30 Dec 2003 18:51:58 -0000	1.25
> +++ summary.php	2 Jan 2004 16:11:29 -0000
> @@ -141,10 +141,12 @@
>                  $html .= _("No folders are being checked for new mail.");
>              } else {
>                  if (!$anyUnseen) {
> -                    $html .= _("No folders with unseen messages.");
> +                    $html .= sprintf('<i>%s</i>',
> +                        _("No folders with unseen messages"));
>                  } else {
>                      if ($prefs->getValue('nav_popup')) {
> -                        $html .= _("No folders with new messages.");
> +                        $html .= sprintf('<i>%s</i>',
> +                            _("No folders with new messages"));
>                      }
>                  }
>              }

The introduction of sprintf() here is excessive; it's not a fast
function.  Please use string concatenation instead, e.g.:

    $html .= '<i>' . _("No folders with unseen messages") . '</i>';

-- 
Jon Parise (jon at horde.org) :: The Horde Project (http://horde.org/)


More information about the dev mailing list