diff options
Diffstat (limited to 'libs/Zend/Mail/Part/File.php')
-rw-r--r-- | libs/Zend/Mail/Part/File.php | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/libs/Zend/Mail/Part/File.php b/libs/Zend/Mail/Part/File.php index efa0538b4d..581195bcc0 100644 --- a/libs/Zend/Mail/Part/File.php +++ b/libs/Zend/Mail/Part/File.php @@ -14,27 +14,27 @@ * * @category Zend * @package Zend_Mail - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: File.php 16971 2009-07-22 18:05:45Z mikaelkael $ + * @version $Id: File.php 20096 2010-01-06 02:05:09Z bkarwin $ */ /** * @see Zend_Mime_Decode */ -require_once 'Zend/Mime/Decode.php'; +// require_once 'Zend/Mime/Decode.php'; /** * @see Zend_Mail_Part */ -require_once 'Zend/Mail/Part.php'; +// require_once 'Zend/Mail/Part.php'; /** * @category Zend * @package Zend_Mail - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail_Part_File extends Zend_Mail_Part @@ -60,10 +60,10 @@ class Zend_Mail_Part_File extends Zend_Mail_Part /** * @see Zend_Mail_Exception */ - require_once 'Zend/Mail/Exception.php'; + // require_once 'Zend/Mail/Exception.php'; throw new Zend_Mail_Exception('no file given in params'); } - + if (!is_resource($params['file'])) { $this->_fh = fopen($params['file'], 'r'); } else { @@ -73,7 +73,7 @@ class Zend_Mail_Part_File extends Zend_Mail_Part /** * @see Zend_Mail_Exception */ - require_once 'Zend/Mail/Exception.php'; + // require_once 'Zend/Mail/Exception.php'; throw new Zend_Mail_Exception('could not open file'); } if (isset($params['startPos'])) { @@ -86,7 +86,7 @@ class Zend_Mail_Part_File extends Zend_Mail_Part } Zend_Mime_Decode::splitMessage($header, $this->_headers, $null); - + $this->_contentPos[0] = ftell($this->_fh); if ($endPos !== null) { $this->_contentPos[1] = $endPos; @@ -97,16 +97,16 @@ class Zend_Mail_Part_File extends Zend_Mail_Part if (!$this->isMultipart()) { return; } - + $boundary = $this->getHeaderField('content-type', 'boundary'); if (!$boundary) { /** * @see Zend_Mail_Exception */ - require_once 'Zend/Mail/Exception.php'; + // require_once 'Zend/Mail/Exception.php'; throw new Zend_Mail_Exception('no boundary found in content type to split message'); } - + $part = array(); $pos = $this->_contentPos[0]; fseek($this->_fh, $pos); @@ -119,7 +119,7 @@ class Zend_Mail_Part_File extends Zend_Mail_Part /** * @see Zend_Mail_Exception */ - require_once 'Zend/Mail/Exception.php'; + // require_once 'Zend/Mail/Exception.php'; throw new Zend_Mail_Exception('error reading file'); } @@ -141,7 +141,7 @@ class Zend_Mail_Part_File extends Zend_Mail_Part } } $this->_countParts = count($this->_partPos); - + } @@ -157,7 +157,7 @@ class Zend_Mail_Part_File extends Zend_Mail_Part { fseek($this->_fh, $this->_contentPos[0]); if ($stream !== null) { - return stream_copy_to_stream($this->_fh, $stream, $this->_contentPos[1] - $this->_contentPos[0]); + return stream_copy_to_stream($this->_fh, $stream, $this->_contentPos[1] - $this->_contentPos[0]); } $length = $this->_contentPos[1] - $this->_contentPos[0]; return $length < 1 ? '' : fread($this->_fh, $length); @@ -188,11 +188,11 @@ class Zend_Mail_Part_File extends Zend_Mail_Part /** * @see Zend_Mail_Exception */ - require_once 'Zend/Mail/Exception.php'; + // require_once 'Zend/Mail/Exception.php'; throw new Zend_Mail_Exception('part not found'); } - return new self(array('file' => $this->_fh, 'startPos' => $this->_partPos[$num][0], + return new self(array('file' => $this->_fh, 'startPos' => $this->_partPos[$num][0], 'endPos' => $this->_partPos[$num][1])); } } |