forked from extern/egroupware
* Mail: Fix preferred identity in compose dialog never get selected
This commit is contained in:
parent
acd54fbfb3
commit
6c102be383
@ -1332,7 +1332,21 @@ class mail_compose
|
|||||||
$etpl->setElementAttribute('folder','autocomplete_params',array('mailaccount'=>$content['mailaccount']));
|
$etpl->setElementAttribute('folder','autocomplete_params',array('mailaccount'=>$content['mailaccount']));
|
||||||
// join again mailaccount and identity
|
// join again mailaccount and identity
|
||||||
$content['mailaccount'] .= ':'.$content['mailidentity'];
|
$content['mailaccount'] .= ':'.$content['mailidentity'];
|
||||||
|
//Try to set the initial selected account to the first identity match found
|
||||||
|
// which fixes the issue of prefered identity never get selected.
|
||||||
|
if (!in_array($content['mailaccount'], array_keys($sel_options['mailaccount'])))
|
||||||
|
{
|
||||||
|
foreach ($sel_options['mailaccount'] as $ident => $value)
|
||||||
|
{
|
||||||
|
$idnt_acc_parts = explode(':', $ident);
|
||||||
|
|
||||||
|
if ($content['mailidentity'] == $idnt_acc_parts[1])
|
||||||
|
{
|
||||||
|
$content['mailaccount'] = $ident;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// Resolve distribution list before send content to client
|
// Resolve distribution list before send content to client
|
||||||
foreach(array('to', 'cc', 'bcc', 'replyto') as $f)
|
foreach(array('to', 'cc', 'bcc', 'replyto') as $f)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user