From d816449d5515d6593a0adfe86c8e0898c02b5d53 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 24 Feb 2009 21:23:59 -0700 Subject: [PATCH] Fix typo; make certificate viewable again --- imp/lib/Mime/Viewer/smime.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/imp/lib/Mime/Viewer/smime.php b/imp/lib/Mime/Viewer/smime.php index 65226da3c..c47b9697f 100644 --- a/imp/lib/Mime/Viewer/smime.php +++ b/imp/lib/Mime/Viewer/smime.php @@ -175,7 +175,7 @@ class IMP_Horde_Mime_Viewer_smime extends Horde_Mime_Viewer_Driver return array(); } - $raw_text = $GLOBALS['imp_imap']->utils->removeBareNewlines($this->_params['contents']->getBodyPart($this->_miempart->getMimeId(), array('mimeheaders' => true))); + $raw_text = $GLOBALS['imp_imap']->utils->removeBareNewlines($this->_params['contents']->getBodyPart($this->_mimepart->getMimeId(), array('mimeheaders' => true))); $sig_result = $this->_impsmime->verifySignature($raw_text); return array( $this->_mimepart->getMimeId() => array( @@ -299,11 +299,10 @@ class IMP_Horde_Mime_Viewer_smime extends Horde_Mime_Viewer_Driver $subject = null; } - if (isset($subpart) && - !empty($subject) && + if (!empty($subject) && $GLOBALS['registry']->hasMethod('contacts/addField') && $GLOBALS['prefs']->getValue('add_source')) { - $status[] = sprintf(_("The S/MIME certificate of %s: "), @htmlspecialchars($subject, ENT_COMPAT, NLS::getCharset())) . $this->_params['contents']->linkViewJS($subpart, 'view_attach', _("View"), array('params' => array('mode' => IMP_Contents::RENDER_INLINE, 'view_smime_key' => 1))) . '/' . Horde::link('#', '', null, null, $this->_impsmime->savePublicKeyURL($sig_result->cert, $this->_params['contents']->getIndex(), $sig_id) . ' return false;') . _("Save in your Address Book") . ''; + $status[] = sprintf(_("The S/MIME certificate of %s: "), @htmlspecialchars($subject, ENT_COMPAT, NLS::getCharset())) . $this->_params['contents']->linkViewJS($this->_mimepart, 'view_attach', _("View"), array('params' => array('mode' => IMP_Contents::RENDER_INLINE, 'view_smime_key' => 1))) . '/' . Horde::link('#', '', null, null, $this->_impsmime->savePublicKeyURL($sig_result->cert, $this->_params['contents']->getIndex(), $sig_id) . ' return false;') . _("Save in your Address Book") . ''; } } } -- 2.11.0