import v2.0.0.0_RC3 | 2012-07-01
https://github.com/lucanos/CommunityID -> http://www.itadmins.net/archives/357
This commit is contained in:
@ -16,7 +16,7 @@
|
||||
* @package Zend_Mail
|
||||
* @copyright Copyright (c) 2005-2009 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 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
@ -63,7 +63,7 @@ class Zend_Mail_Part_File extends Zend_Mail_Part
|
||||
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 {
|
||||
@ -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,7 +97,7 @@ class Zend_Mail_Part_File extends Zend_Mail_Part
|
||||
if (!$this->isMultipart()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$boundary = $this->getHeaderField('content-type', 'boundary');
|
||||
if (!$boundary) {
|
||||
/**
|
||||
@ -106,7 +106,7 @@ class Zend_Mail_Part_File extends Zend_Mail_Part
|
||||
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);
|
||||
@ -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);
|
||||
@ -192,7 +192,7 @@ class Zend_Mail_Part_File extends Zend_Mail_Part
|
||||
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]));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user