/**
* Rfc822Header.class.php
*
- * Copyright (c) 2003-2005 The SquirrelMail Project Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
* This file contains functions needed to handle headers in mime messages.
*
+ * @copyright © 2003-2006 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package squirrelmail
* @subpackage mime
*/
var $mime = false;
/**
- * @var mixed
+ * Content Type object
+ * @var object
*/
var $content_type = '';
/**
*/
var $priority = 3;
/**
+ * Disposition notification for requesting message delivery notification (MDN)
* @var mixed
*/
var $dnt = '';
+ /**
+ * Delivery notification (DR)
+ * @var mixed
+ */
+ var $drnt = '';
/**
* @var mixed
*/
}
}
}
- if ($this->content_type == '') {
+ if (!is_object($this->content_type)) {
$this->parseContentType('text/plain; charset=us-ascii');
}
}
}
$result .= $value{$i};
}
- $result .= $value{$i};
+ if($i < $cnt) {
+ $result .= $value{$i};
+ }
break;
case '(':
$depth = 1;
$this->references = $value;
break;
case 'x-confirm-reading-to':
- case 'return-receipt-to':
case 'disposition-notification-to':
$value = $this->stripComments($value);
$this->dnt = $this->parseAddress($value);
break;
+ case 'return-receipt-to':
+ $value = $this->stripComments($value);
+ $this->drnt = $this->parseAddress($value);
+ break;
case 'mime-version':
$value = $this->stripComments($value);
$value = str_replace(' ', '', $value);
* NOTE: this is actually a duplicate from the function in
* functions/imap_messages. I'm not sure if it's ok here to call
* that function?
- * @param string $value literal priority name
+ * @param string $sValue literal priority name
* @return integer
*/
- function parsePriority($value) {
- $value = strtolower(array_shift(split('/\w/',trim($value))));
+ function parsePriority($sValue) {
+ // don't use function call inside array_shift.
+ $aValue = split('/\w/',trim($sValue));
+ $value = strtolower(array_shift($aValue));
+
if ( is_numeric($value) ) {
return $value;
}
return $this->content_type->properties;
}
}
-
-?>
\ No newline at end of file