information about administrative restrictions in bug_report plugin
[squirrelmail.git] / src / view_text.php
index 409995aaa35f8c38fb00c9c335b7fcd9f8295bc1..63fc896058073d198f5f0c4906d9fee9774d65fd 100644 (file)
@@ -3,13 +3,12 @@
 /**
  * view_text.php -- Displays the main frameset
  *
- * Copyright (c) 1999-2004 The SquirrelMail development team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
  * Who knows what this file does. However PUT IT HERE DID NOT PUT
  * A SINGLE FREAKING COMMENT IN! Whoever is responsible for this,
  * be very ashamed.
  *
+ * @copyright © 1999-2005 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
  */
@@ -46,7 +45,7 @@ $message = &$messages[$mbx_response['UIDVALIDITY']][$passed_id];
 if (!is_object($message)) {
     $message = sqimap_get_message($imapConnection, $passed_id, $mailbox);
 }
-$message_ent = &$message->getEntity($ent_id);
+$message_ent = $message->getEntity($ent_id);
 if ($passed_ent_id) {
     $message = &$message->getEntity($passed_ent_id);
 }
@@ -72,6 +71,9 @@ if (isset($languages[$squirrelmail_language]['XTRA_CODE']) &&
 
 if ($type1 == 'html' || (isset($override_type1) &&  $override_type1 == 'html')) {
     $body = MagicHTML( $body, $passed_id, $message, $mailbox);
+    // html attachment with character set information
+    if (! empty($charset))
+        $body = charset_decode($charset,$body,false,true);
 } else {
     translateText($body, $wrap_at, $charset);
 }
@@ -95,4 +97,4 @@ echo '<a href="' . $dwnld_url . '">' . _("Download this as a file") . '</a>';
 <tr><td bgcolor="<?php echo $color[4]; ?>"><tt>
 <?php echo $body; ?>
 </tt></td></tr></table>
-</body></html>
+</body></html>
\ No newline at end of file