From 9e914642eb743ba6dcdb2c6ec382d04df9182c3c Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Mon, 14 Dec 2009 23:58:57 -0700 Subject: [PATCH] Fix double output of status message. --- imp/lib/Mime/Viewer/Pgp.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/imp/lib/Mime/Viewer/Pgp.php b/imp/lib/Mime/Viewer/Pgp.php index b2bca0d51..c5b8581b0 100644 --- a/imp/lib/Mime/Viewer/Pgp.php +++ b/imp/lib/Mime/Viewer/Pgp.php @@ -244,18 +244,12 @@ class IMP_Horde_Mime_Viewer_Pgp extends Horde_Mime_Viewer_Driver $status[] = _("The data in this part has been compressed via PGP."); } else { $status[] = _("The data in this part has been encrypted via PGP."); + if (!$symmetric) { - if (!$this->_imppgp->getPersonalPrivateKey()) { - /* Output if there is no personal private key to decrypt - * with. */ - $status[] = _("The data in this part has been encrypted via PGP, however, no personal private key exists so the message cannot be decrypted."); - return null; - } else { + if ($this->_imppgp->getPersonalPrivateKey()) { $personal_pass = $this->_imppgp->getPassphrase('personal'); - if (is_null($personal_pass)) { $js_action = ''; - $status[] = _("The data in this part has been encrypted via PGP."); switch ($_SESSION['imp']['view']) { case 'dimp': @@ -270,6 +264,11 @@ class IMP_Horde_Mime_Viewer_Pgp extends Horde_Mime_Viewer_Driver } return null; } + } else { + /* Output if there is no personal private key to decrypt + * with. */ + $status[] = _("However, no personal private key exists so the message cannot be decrypted."); + return null; } } } -- 2.11.0