* Mail: Do not popup smime certificate dialog if the smime is not configured

This commit is contained in:
Hadi Nategh 2017-12-07 14:14:01 +01:00
parent 2cec97a6c5
commit 6a8ef2111a

View File

@ -3153,9 +3153,10 @@ $filter['before']= date("d-M-Y", $cutoffdate2);
$structure = $this->mail_bo->getStructure($uid, $partID, $mailbox, false);
if (($smime = $structure->getMetadata('X-EGroupware-Smime')))
{
$acc_smime = Mail\Smime::get_acc_smime($this->mail_bo->profileID);
$attachments = $this->mail_bo->getMessageAttachments($uid, $partID, $structure,true,false,true, $mailbox);
$push = new Api\Json\Push($GLOBALS['egw_info']['user']['account_id']);
if (!empty($smime['addtocontact'])) $push->call('app.mail.smime_certAddToContact', $smime);
if (!empty($acc_smime) && !empty($smime['addtocontact'])) $push->call('app.mail.smime_certAddToContact', $smime);
if (is_array($attachments))
{
$push->call('app.mail.set_smimeAttachments', $this->createAttachmentBlock($attachments, $_GET['_messageID'], $uid, $mailbox));