mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-18 04:31:06 +01:00
handle problems in email display and processing for further use
This commit is contained in:
parent
0562c8c0b5
commit
fa50e7985a
@ -661,11 +661,21 @@ app.classes.mail = AppJS.extend(
|
||||
content = content[0].split(',');
|
||||
}
|
||||
// Add for current record
|
||||
var remembervalue = '';
|
||||
for(var i = 0; i < content.length; i++)
|
||||
{
|
||||
var value = content[i];
|
||||
var email = et2_createWidget('url-email',{id:widget.id+'_'+i, value:value,readonly:true, contact_plus:true},widget);
|
||||
email.loadingFinished();
|
||||
// if there is no @ in string, its most likely that we have a comma in the personal name part of the emailaddress
|
||||
if (content[i].indexOf('@')<0)
|
||||
{
|
||||
remembervalue = content[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
var value = remembervalue+(remembervalue?',':'')+content[i];
|
||||
var email = et2_createWidget('url-email',{id:widget.id+'_'+i, value:value,readonly:true, contact_plus:true},widget);
|
||||
email.loadingFinished();
|
||||
remembervalue = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -102,7 +102,7 @@ if (!function_exists('imap_rfc822_parse_adrlist'))
|
||||
foreach(explode(',', $address) as $part)
|
||||
{
|
||||
$trimmed = trim(($pending ? $pending.',' : '').$part);
|
||||
if ($trimmed[0] == '"' && substr($trimmed, -1) != '>')
|
||||
if (($trimmed[0] == '"' && substr($trimmed, -1) != '>')||strpos($part, '@')===false)
|
||||
{
|
||||
$pending .= ($pending ? $pending.',' : '').$part;
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user