From: Philippe M. <phi...@us...> - 2001-10-30 16:42:12
|
Update of /cvsroot/squirrelmail/squirrelmail/functions In directory usw-pr-cvs1:/tmp/cvs-serv19504 Modified Files: display_messages.php strings.php Log Message: Coma bugfix Index: display_messages.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/functions/display_messages.php,v retrieving revision 1.26 retrieving revision 1.27 diff -u -w -r1.26 -r1.27 Index: strings.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/functions/strings.php,v retrieving revision 1.114 retrieving revision 1.115 diff -u -w -r1.114 -r1.115 --- strings.php 2001/10/30 08:32:58 1.114 +++ strings.php 2001/10/30 16:42:08 1.115 @@ -161,13 +161,13 @@ function getLineOfAddrs($array) { if (is_array($array)) { $to_line = implode(', ', $array); - $to_line = trim(ereg_replace(', (, )+', ', ', $to_line)); + $to_line = ereg_replace(', (, )+', ', ', $to_line); + $to_line = trim(ereg_replace('^, ', '', $to_line)); + if( substr( $to_line, -1 ) == ',' ) + $to_line = substr( $to_line, 0, -1 ); } else { $to_line = ''; } - - if( substr( $to_line, -1 ) == ',' ) - $to_line = substr( $to_line, 0, strlen( $to_line ) - 1 ); return( $to_line ); } |