mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-24 07:39:27 +01:00
when dealing with defaults and identities: retrieve the default identity associated with the current imap-account, rather than the default
This commit is contained in:
parent
5f0c0f6804
commit
94af47ef5d
@ -374,6 +374,9 @@ class mail_compose
|
|||||||
$this->changeProfile($_content['serverID']);
|
$this->changeProfile($_content['serverID']);
|
||||||
$composeProfile = $this->mail_bo->profileID;
|
$composeProfile = $this->mail_bo->profileID;
|
||||||
}
|
}
|
||||||
|
// make sure $acc is set/initalized properly with the current composeProfile, as $acc is used down there
|
||||||
|
// at several locations and not neccesaryly initialized before
|
||||||
|
$acc = emailadmin_account::read($composeProfile);
|
||||||
$buttonClicked = false;
|
$buttonClicked = false;
|
||||||
if ($_content['composeToolbar'] === 'send')
|
if ($_content['composeToolbar'] === 'send')
|
||||||
{
|
{
|
||||||
@ -1022,7 +1025,7 @@ class mail_compose
|
|||||||
|
|
||||||
// fetch the signature, prepare the select box, ...
|
// fetch the signature, prepare the select box, ...
|
||||||
if (empty($content['mailidentity'])) {
|
if (empty($content['mailidentity'])) {
|
||||||
$content['mailidentity'] = $acc['ident_id'];
|
$content['mailidentity'] = $acc['ident_id']?$acc['ident_id']:$acc['acc_id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$disableRuler = false;
|
$disableRuler = false;
|
||||||
@ -3057,8 +3060,8 @@ class mail_compose
|
|||||||
*/
|
*/
|
||||||
function setDefaults($content=array())
|
function setDefaults($content=array())
|
||||||
{
|
{
|
||||||
// retrieve the signature accociated with the identity
|
// retrieve the signature accociated with the identity associated with the current account, rather than the default
|
||||||
$id = $this->mail_bo->getDefaultIdentity();
|
$id = ($this->mail_bo->icServer->ident_id?$this->mail_bo->icServer->ident_id:$this->mail_bo->getDefaultIdentity());
|
||||||
if (isset($GLOBALS['egw_info']['user']['preferences']['mail']['LastSignatureIDUsed']) && !empty($GLOBALS['egw_info']['user']['preferences']['mail']['LastSignatureIDUsed']))
|
if (isset($GLOBALS['egw_info']['user']['preferences']['mail']['LastSignatureIDUsed']) && !empty($GLOBALS['egw_info']['user']['preferences']['mail']['LastSignatureIDUsed']))
|
||||||
{
|
{
|
||||||
$sigPref = $GLOBALS['egw_info']['user']['preferences']['mail']['LastSignatureIDUsed'];
|
$sigPref = $GLOBALS['egw_info']['user']['preferences']['mail']['LastSignatureIDUsed'];
|
||||||
|
Loading…
Reference in New Issue
Block a user