if a profile has no signature assigned, return the defaultSig on setComposeSignature

This commit is contained in:
Klaus Leithoff 2011-08-03 11:32:26 +00:00
parent b5ed1b7eb9
commit 1740140e0b

View File

@ -1064,9 +1064,18 @@ class ajaxfelamimail
$preferences =& $boPreferences->getPreferences();
$Identities = $preferences->getIdentity($identity);
//error_log(print_r($Identities->signature,true));
$response = new xajaxResponse();
$response->addScript('setSignature('.$Identities->signature.');');
if ($Identities->signature)
{
$response->addScript('setSignature('.$Identities->signature.');');
}
else
{
$bosignatures = CreateObject('felamimail.felamimail_bosignatures');
$defaultSig = $bosignatures->getDefaultSignature();
if ($defaultSig === false) $defaultSig = -1;
$response->addScript('setSignature('.$defaultSig.');');
}
return $response->getXML();
}