mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-26 18:03:39 +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
be5dd5435b
commit
52b4856a18
@ -374,6 +374,9 @@ class mail_compose
|
||||
$this->changeProfile($_content['serverID']);
|
||||
$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;
|
||||
if ($_content['composeToolbar'] === 'send')
|
||||
{
|
||||
@ -1022,7 +1025,7 @@ class mail_compose
|
||||
|
||||
// fetch the signature, prepare the select box, ...
|
||||
if (empty($content['mailidentity'])) {
|
||||
$content['mailidentity'] = $acc['ident_id'];
|
||||
$content['mailidentity'] = $acc['ident_id']?$acc['ident_id']:$acc['acc_id'];
|
||||
}
|
||||
|
||||
$disableRuler = false;
|
||||
@ -2437,7 +2440,7 @@ class mail_compose
|
||||
*/
|
||||
public function ajax_saveAsDraft ($content, $action='button[saveAsDraft]')
|
||||
{
|
||||
//error_log(__METHOD__."(, action=$action)");
|
||||
//error_log(__METHOD__.__LINE__.array2string($content)."(, action=$action)");
|
||||
$response = egw_json_response::get();
|
||||
$success = true;
|
||||
|
||||
@ -3057,8 +3060,8 @@ class mail_compose
|
||||
*/
|
||||
function setDefaults($content=array())
|
||||
{
|
||||
// retrieve the signature accociated with the identity
|
||||
$id = $this->mail_bo->getDefaultIdentity();
|
||||
// retrieve the signature accociated with the identity associated with the current account, rather than the default
|
||||
$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']))
|
||||
{
|
||||
$sigPref = $GLOBALS['egw_info']['user']['preferences']['mail']['LastSignatureIDUsed'];
|
||||
|
Loading…
Reference in New Issue
Block a user