mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-26 01:43:47 +01:00
handle problems in email display and processing for further use after commit rev48461
This commit is contained in:
parent
8c9854daa2
commit
dc472cdb11
@ -663,11 +663,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