Make sure that the smime is configured before pre-setting the sign/encrypt actions

This commit is contained in:
Hadi Nategh 2017-09-08 14:24:55 +02:00
parent bebf9d74cc
commit 38c227817b

View File

@ -324,12 +324,15 @@ class mail_compose
// Additionally may be changed
$_focusElement, $suppressSigOnTop, $isReply
));
if (isset($_GET['smime_type'])) $smime_type = $_GET['smime_type'];
// pre set smime_sign and smime_encrypt actions if the original
// message is smime.
$_content['smime_sign'] = $smime_type == (Mail\Smime::TYPE_SIGN ||
if (Mail\Smime::get_acc_smime($this->mail_bo->profileID))
{
if (isset($_GET['smime_type'])) $smime_type = $_GET['smime_type'];
// pre set smime_sign and smime_encrypt actions if the original
// message is smime.
$_content['smime_sign'] = $smime_type == (Mail\Smime::TYPE_SIGN ||
$smime_type == Mail\Smime::TYPE_SIGN_ENCRYPT) ? 'on' : 'off';
$_content['smime_encrypt'] = ($smime_type == Mail\Smime::TYPE_ENCRYPT) ? 'on' : 'off';
$_content['smime_encrypt'] = ($smime_type == Mail\Smime::TYPE_ENCRYPT) ? 'on' : 'off';
}
$actionToProcess = $_GET['from'];
unset($_GET['from']);