mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-17 05:23:13 +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(',');
|
content = content[0].split(',');
|
||||||
}
|
}
|
||||||
// Add for current record
|
// Add for current record
|
||||||
|
var remembervalue = '';
|
||||||
for(var i = 0; i < content.length; i++)
|
for(var i = 0; i < content.length; i++)
|
||||||
{
|
{
|
||||||
var value = content[i];
|
// 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);
|
var email = et2_createWidget('url-email',{id:widget.id+'_'+i, value:value,readonly:true, contact_plus:true},widget);
|
||||||
email.loadingFinished();
|
email.loadingFinished();
|
||||||
|
remembervalue = '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -102,7 +102,7 @@ if (!function_exists('imap_rfc822_parse_adrlist'))
|
|||||||
foreach(explode(',', $address) as $part)
|
foreach(explode(',', $address) as $part)
|
||||||
{
|
{
|
||||||
$trimmed = trim(($pending ? $pending.',' : '').$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;
|
$pending .= ($pending ? $pending.',' : '').$part;
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user