From 56d7390433eb37a0ba83360d1120617ddf313dc1 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 19 May 2009 04:43:27 -0600 Subject: [PATCH] Better error reporting when pgp public key not available. --- imp/lib/Mime/Viewer/Pgp.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/imp/lib/Mime/Viewer/Pgp.php b/imp/lib/Mime/Viewer/Pgp.php index b11db05ff..501afee40 100644 --- a/imp/lib/Mime/Viewer/Pgp.php +++ b/imp/lib/Mime/Viewer/Pgp.php @@ -348,15 +348,10 @@ class IMP_Horde_Mime_Viewer_Pgp extends Horde_Mime_Viewer_Driver ? $this->_imppgp->verifySignature($signed_data, $this->_address) : $this->_imppgp->verifySignature($signed_data, $this->_address, $sig_part->getContents()); - if ($sig_result->result) { - $icon = Horde::img('alerts/success.png', _("Success"), null, $graphicsdir); - $sig_text = $sig_result->message; - } else { - $icon = Horde::img('alerts/warning.png', _("Warning"), null, $graphicsdir); - $sig_text = _("The signature could not be checked because the sender's key could not be found."); - } + $icon = Horde::img('alerts/success.png', _("Success"), null, $graphicsdir); + $sig_text = $sig_result->message; } catch (Horde_Exception $e) { - $icon = Horde::img('alerts/error.png', _("Error"), null, $graphicsdir); + $icon = Horde::img('alerts/warning.png', _("Warning"), null, $graphicsdir); $sig_text = $e->getMessage(); } -- 2.11.0