fixes for r12283: mistakenly passed already-split date to date_unparsed,
[squirrelmail.git] / class / mime / Rfc822Header.class.php
index 68519a00ec78610be1baa391927cd179fc0dbf8e..ccb38c55590129af33eb6ee5d3777d5aa7828e1c 100644 (file)
@@ -5,7 +5,7 @@
  *
  * This file contains functions needed to handle headers in mime messages.
  *
- * @copyright © 2003-2006 The SquirrelMail Project Team
+ * @copyright © 2003-2007 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
@@ -29,6 +29,11 @@ class Rfc822Header {
      * @var mixed
      */
     var $date = -1;
+    /**
+     * Original date header as fallback for unparsable dates
+     * @var mixed
+     */
+    var $date_unparsed = '';
     /**
      * Subject header
      * @var string
@@ -234,6 +239,7 @@ class Rfc822Header {
                 $d = strtr($value, array('  ' => ' '));
                 $d = explode(' ', $d);
                 $this->date = getTimeStamp($d);
+                $this->date_unparsed = strtr($value,'<>','  ');
                 break;
             case 'subject':
                 $this->subject = $value;
@@ -343,7 +349,7 @@ class Rfc822Header {
                 $value = $this->stripComments($value);
                 $this->mlist('id', $value);
                 break;
-           case 'x-spam-status':
+            case 'x-spam-status':
                 $this->x_spam_status = $this->parseSpamStatus($value);
                 break;
             default: