From: Chuck Hagenbuch Date: Wed, 12 Aug 2009 01:04:56 +0000 (-0400) Subject: add a place to ensure that $this->_imppgp is initialized X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=52c1212088f3d0fc2b3d174df7e5167151712286;p=horde.git add a place to ensure that $this->_imppgp is initialized --- diff --git a/imp/lib/Mime/Viewer/Pgp.php b/imp/lib/Mime/Viewer/Pgp.php index d0aec8e37..3e9a620c8 100644 --- a/imp/lib/Mime/Viewer/Pgp.php +++ b/imp/lib/Mime/Viewer/Pgp.php @@ -266,6 +266,16 @@ class IMP_Horde_Mime_Viewer_Pgp extends Horde_Mime_Viewer_Driver */ protected function _outputPGPKey() { + /* Is PGP active? */ + if (empty($GLOBALS['conf']['gnupg']['path']) || + !$GLOBALS['prefs']->getValue('use_pgp')) { + return array(); + } + + if (empty($this->_imppgp)) { + $this->_imppgp = Horde_Crypt::singleton(array('IMP', 'Pgp')); + } + /* Initialize status message. */ $status = array( 'icon' => Horde::img('mime/encryption.png', 'PGP'),