From 6282af0942232016066870b41fac23f9af4dfe20 Mon Sep 17 00:00:00 2001 From: antipode Date: Fri, 28 Dec 2001 21:23:28 +0000 Subject: [PATCH] Updated documentation for sqimap_find_displayable_name() git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1995 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_general.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/functions/imap_general.php b/functions/imap_general.php index 691eb011..9333f177 100755 --- a/functions/imap_general.php +++ b/functions/imap_general.php @@ -334,13 +334,17 @@ function sqimap_find_email ($string) { /* -* Takes the From: field, and creates a displayable name. -* Luke Ehresman -* becomes: Luke Ehresman -* -* becomes: lkehresman@yahoo.com -*/ + * Takes the From: field, and creates a displayable name. + * Luke Ehresman + * "Luke Ehresman" + * lkehresman@yahoo.com (Luke Ehresman) + * become: Luke Ehresman + * + * becomes: lkehresman@yahoo.com + */ function sqimap_find_displayable_name ($string) { + $string = trim($string); + if ( ereg('^(.+)<.*>', $string, $regs) ) { $string = ereg_replace ('"', '', $regs[1] ); } -- 2.25.1