centralise the "From"-header construction in functions/identities.php.
[squirrelmail.git] / src / printer_friendly_bottom.php
index e0f338a971046eb45473fe75ecac53b3d317289f..b65da692986a047892493bf7d30af112dca867cd 100644 (file)
@@ -8,7 +8,7 @@
  *
  * - this is the page that does all the work, really.
  *
- * @copyright © 1999-2006 The SquirrelMail Project Team
+ * @copyright © 1999-2007 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
@@ -52,7 +52,7 @@ if ($passed_ent_id) {
 $rfc822_header = $message->rfc822_header;
 /* From and Date are usually fine as they are... */
 $from = $rfc822_header->getAddr_s('from');
-$date = getLongDateString($rfc822_header->date);
+$date = getLongDateString($rfc822_header->date, $rfc822_header->date_unparsed);
 $subject = trim($rfc822_header->subject);
 
 /* we can clean these up if the list is too long... */
@@ -72,8 +72,8 @@ if ($ent_ar[0] != '') {
         $body .= '<hr />';
      }
   }
-  $hookResults = do_hook('message_body', $body);
-  $body = $hookResults[1];
+  /* Note that $body is passed to this hook (and modified) by reference as of 1.5.2 */
+  do_hook('message_body', $body);
 } else {
   $body = _("Message not printable");
 }