From: Michael M Slusarz Date: Tue, 18 Nov 2008 21:01:58 +0000 (-0700) Subject: Use Horde_Crypt to instantiate. Remove todo. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=014002751e014dccec658b4a3ca9ae8140962bf8;p=horde.git Use Horde_Crypt to instantiate. Remove todo. Not sure if works yet, but there is no reason technically why encrypted body text parts won't appear in reply/forward messages anymore. --- diff --git a/imp/lib/Compose.php b/imp/lib/Compose.php index 81e7ed737..78ae8e638 100644 --- a/imp/lib/Compose.php +++ b/imp/lib/Compose.php @@ -490,8 +490,7 @@ class IMP_Compose /* Instantiate IMP_PGP object if we're appending a PGP signature. */ if ($this->_pgpAttachPubkey) { - require_once IMP_BASE . '/lib/Crypt/PGP.php'; - $imp_pgp = new IMP_PGP(); + $imp_pgp = &Horde_Crypt::singleton(array('imp', 'pgp')); } /* Add attachments now. */ @@ -614,8 +613,7 @@ class IMP_Compose $prefs->getValue('use_pgp') && !empty($conf['utils']['gnupg']) && in_array($encrypt, array(IMP::PGP_ENCRYPT, IMP::PGP_SIGNENC, IMP::PGP_SYM_ENCRYPT, IMP::PGP_SYM_SIGNENC))) { - require_once IMP_BASE .'/lib/Crypt/PGP.php'; - $imp_pgp = new IMP_PGP(); + $imp_pgp = &Horde_Crypt::singleton(array('imp', 'pgp')); } if (!empty($encrypt) && @@ -1166,8 +1164,7 @@ class IMP_Compose /* Set up the base message now. */ if ($usePGP && in_array($encrypt, array(IMP::PGP_ENCRYPT, IMP::PGP_SIGN, IMP::PGP_SIGNENC, IMP::PGP_SYM_ENCRYPT, IMP::PGP_SYM_SIGNENC))) { - require_once IMP_BASE .'/lib/Crypt/PGP.php'; - $imp_pgp = new IMP_PGP(); + $imp_pgp = &Horde_Crypt::singleton(array('imp', 'pgp')); /* Get the user's passphrases, if we need it. */ $passphrase = ''; @@ -1287,12 +1284,6 @@ class IMP_Compose $body = $mime_part->getContents(); $this->_bodyCharset = $mime_part->getCharset(); - //if ($mime_message->getType() == 'multipart/encrypted') { - /* TODO: Maybe someday I can figure out how to show embedded - * text parts here. But for now, just output this message. */ - // return '[' . _("Original message was encrypted") . ']'; - //} - if (!$this->_findhtml && ($mime_part->getSubType() == 'html')) { require_once 'Horde/Text/Filter.php'; return Text_Filter::filter(