From 6a8ef2111a3a8fc3f1419b8f9de91d4cbf69bfa3 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Thu, 7 Dec 2017 14:14:01 +0100 Subject: [PATCH] * Mail: Do not popup smime certificate dialog if the smime is not configured --- mail/inc/class.mail_ui.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index 0482d360a0..378033b816 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -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));