Small optimization
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 10 Nov 2009 17:05:37 +0000 (10:05 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 10 Nov 2009 21:41:07 +0000 (14:41 -0700)
imp/lib/Mime/Viewer/Smime.php

index 5b57cd9..213d234 100644 (file)
@@ -254,9 +254,9 @@ class IMP_Horde_Mime_Viewer_Smime extends Horde_Mime_Viewer_Driver
             $hdrs->addHeader('From', $this->_mimepart->getMetadata('imp-smime-from'));
             $stream = $this->_mimepart->toString(array('headers' => $hdrs, 'stream' => true));
         } else {
-            $stream = $base_id
-                ? $this->_params['contents']->getBodyPart($base_id, array('mimeheaders' => true, 'stream' => true))
-                : $this->_params['contents']->fullMessageText(array('stream' => true));
+            /* This can never be the base of the message since it appears
+             * only within a multipart/signed part. */
+            $stream = $this->_params['contents']->getBodyPart($base_id, array('mimeheaders' => true, 'stream' => true));
         }
 
         $raw_text = $this->_mimepart->replaceEOL($stream, Horde_Mime_Part::RFC_EOL);