mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-28 10:53:39 +01:00
applying system/default signature as default, when user has no signature assigned to user defined profile, and system signature is available.
This commit is contained in:
parent
f654e9458e
commit
256e6ef220
@ -314,7 +314,7 @@
|
||||
if(!empty($singleIdentity->default)) {
|
||||
#$defaultIdentity = $singleIdentity->id;
|
||||
$defaultIdentity = $key;
|
||||
$sessionData['signatureID'] = $singleIdentity->signature;
|
||||
$sessionData['signatureID'] = (!empty($singleIdentity->signature) ? $singleIdentity->signature : $sessionData['signatureID']);
|
||||
}
|
||||
}
|
||||
$selectFrom = html::select('identity', ($presetId ? $presetId : $defaultIdentity), $identities, true, "style='width:100%;' onchange='changeIdentity(this);'");
|
||||
|
@ -297,10 +297,10 @@
|
||||
if ($account2retrieve != 'new') {
|
||||
$accountData = $this->bopreferences->getAccountData($preferences, $account2retrieve);
|
||||
$icServer =& $accountData['icServer'];
|
||||
#_debug_array($icServer);
|
||||
//_debug_array($icServer);
|
||||
$ogServer =& $accountData['ogServer'];
|
||||
$identity =& $accountData['identity'];
|
||||
#_debug_array($identity);
|
||||
//_debug_array($identity);
|
||||
}
|
||||
|
||||
if ($icServer) {
|
||||
@ -346,10 +346,14 @@
|
||||
$allSignatures = array(
|
||||
'-2' => lang('no signature')
|
||||
);
|
||||
$systemsig = false;
|
||||
foreach ($signatures as $sigkey => $sig) {
|
||||
//echo "Keys to check: $sigkey with ".$sig['fm_signatureid']."<br>";
|
||||
if ($sig['fm_signatureid'] == -1) $systemsig = true;
|
||||
$allSignatures[$sig['fm_signatureid']] = $sig['fm_description'];
|
||||
}
|
||||
$sigvalue = -2;
|
||||
// if there is a system signature, then use the systemsignature as preset/default
|
||||
$sigvalue = $defaultsig = ($systemsig ? -1 : -2);
|
||||
if ($identity) {
|
||||
foreach($identity as $key => $value) {
|
||||
if(is_object($value) || is_array($value)) {
|
||||
@ -357,7 +361,8 @@
|
||||
}
|
||||
switch($key) {
|
||||
case 'signature':
|
||||
$sigvalue = $value;
|
||||
// if empty, use the default
|
||||
$sigvalue = (!empty($value)?$value:$defaultsig);
|
||||
break;
|
||||
default:
|
||||
$this->t->set_var("identity[$key]", $value);
|
||||
|
Loading…
Reference in New Issue
Block a user