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:
2019-07-17 22:31:04 +02:00
parent 38c146901c
commit 2f397f01f7
2677 changed files with 296182 additions and 45159 deletions

View File

@ -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 $
*/
@ -59,7 +59,7 @@ class Zend_Mail_Message_File extends Zend_Mail_Part_File implements Zend_Mail_Me
// set key and value to the same value for easy lookup
$this->_flags = array_combine($params['flags'], $params['flags']);
}
parent::__construct($params);
}

View File

@ -11,13 +11,13 @@
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
*
* @category Zend
* @package Zend_Mail
* @subpackage Storage
* @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: Interface.php 16971 2009-07-22 18:05:45Z mikaelkael $
* @version $Id: Interface.php 18951 2009-11-12 16:26:19Z alexander $
*/

View File

@ -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: Part.php 16219 2009-06-21 19:45:39Z thomas $
* @version $Id: Part.php 18951 2009-11-12 16:26:19Z alexander $
*/
@ -381,7 +381,7 @@ class Zend_Mail_Part implements RecursiveIterator, Zend_Mail_Part_Interface
return false;
}
}
/**
* Get a specific field from a header like content type or all fields as array
*

View File

@ -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]));
}
}

View File

@ -11,13 +11,13 @@
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
*
* @category Zend
* @package Zend_Mail
* @subpackage Storage
* @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: Interface.php 16971 2009-07-22 18:05:45Z mikaelkael $
* @version $Id: Interface.php 18951 2009-11-12 16:26:19Z alexander $
*/
@ -95,7 +95,7 @@ interface Zend_Mail_Part_Interface extends RecursiveIterator
* @throws Zend_Mail_Exception
*/
public function getHeader($name, $format = null);
/**
* Get a specific field from a header like content type or all fields as array
*

View File

@ -12,13 +12,13 @@
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
*
* @category Zend
* @package Zend_Mail
* @subpackage Protocol
* @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: Abstract.php 16219 2009-06-21 19:45:39Z thomas $
* @version $Id: Abstract.php 18951 2009-11-12 16:26:19Z alexander $
*/
@ -38,13 +38,13 @@ require_once 'Zend/Validate/Hostname.php';
* Zend_Mail_Protocol_Abstract
*
* Provides low-level methods for concrete adapters to communicate with a remote mail server and track requests and responses.
*
*
* @category Zend
* @package Zend_Mail
* @subpackage Protocol
* @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: Abstract.php 16219 2009-06-21 19:45:39Z thomas $
* @version $Id: Abstract.php 18951 2009-11-12 16:26:19Z alexander $
* @todo Implement proxy settings
*/
abstract class Zend_Mail_Protocol_Abstract

View File

@ -11,13 +11,13 @@
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
*
* @category Zend
* @package Zend_Mail
* @subpackage Protocol
* @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: Exception.php 16219 2009-06-21 19:45:39Z thomas $
* @version $Id: Exception.php 18951 2009-11-12 16:26:19Z alexander $
*/

View File

@ -11,13 +11,13 @@
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
*
* @category Zend
* @package Zend_Mail
* @subpackage Protocol
* @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: Imap.php 16219 2009-06-21 19:45:39Z thomas $
* @version $Id: Imap.php 18977 2009-11-14 14:15:59Z yoshida@zend.co.jp $
*/
@ -34,7 +34,7 @@ class Zend_Mail_Protocol_Imap
* Default timeout in seconds for initiating session
*/
const TIMEOUT_CONNECTION = 30;
/**
* socket to imap server
* @var resource|null
@ -50,7 +50,7 @@ class Zend_Mail_Protocol_Imap
/**
* Public constructor
*
* @param string $host hostname of IP address of IMAP server, if given connect() is called
* @param string $host hostname or IP address of IMAP server, if given connect() is called
* @param int|null $port port of IMAP server, null for default (143 or 993 for ssl)
* @param bool $ssl use ssl? 'SSL', 'TLS' or false
* @throws Zend_Mail_Protocol_Exception
@ -71,9 +71,9 @@ class Zend_Mail_Protocol_Imap
}
/**
* Open connection to POP3 server
* Open connection to IMAP server
*
* @param string $host hostname of IP address of POP3 server
* @param string $host hostname or IP address of IMAP server
* @param int|null $port of IMAP server, default is 143 (993 for ssl)
* @param string|bool $ssl use 'SSL', 'TLS' or false
* @return string welcome message
@ -97,7 +97,8 @@ class Zend_Mail_Protocol_Imap
* @see Zend_Mail_Protocol_Exception
*/
require_once 'Zend/Mail/Protocol/Exception.php';
throw new Zend_Mail_Protocol_Exception('cannot connect to host : ' . $errno . ' : ' . $errstr);
throw new Zend_Mail_Protocol_Exception('cannot connect to host; error = ' . $errstr .
' (errno = ' . $errno . ' )');
}
if (!$this->_assumedNextLine('* OK')) {
@ -195,8 +196,8 @@ class Zend_Mail_Protocol_Imap
"foo" baz {3}<NL>bar ("f\\\"oo" bar)
would be returned as:
array('foo', 'baz', 'bar', array('f\\\"oo', 'bar'));
// TODO: add handling of '[' and ']' to parser for easier handling of response text
// TODO: add handling of '[' and ']' to parser for easier handling of response text
*/
// replace any trailling <NL> including spaces with a single space
$line = rtrim($line) . ' ';
@ -208,7 +209,7 @@ class Zend_Mail_Protocol_Imap
$token = substr($token, 1);
}
if ($token[0] == '"') {
if (preg_match('%^"((.|\\\\|\\")*?)" *%', $line, $matches)) {
if (preg_match('%^\(*"((.|\\\\|\\")*?)" *%', $line, $matches)) {
$tokens[] = $matches[1];
$line = substr($line, strlen($matches[0]));
continue;
@ -241,8 +242,8 @@ class Zend_Mail_Protocol_Imap
// only count braces if more than one
$braces -= strlen($token) + 1;
// only add if token had more than just closing braces
if ($token) {
$tokens[] = $token;
if (rtrim($token) != '') {
$tokens[] = rtrim($token);
}
$token = $tokens;
$tokens = array_pop($stack);
@ -824,7 +825,7 @@ class Zend_Mail_Protocol_Imap
if (!$response) {
return $response;
}
foreach ($response as $ids) {
if ($ids[0] == 'SEARCH') {
array_shift($ids);

View File

@ -11,13 +11,13 @@
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
*
* @category Zend
* @package Zend_Mail
* @subpackage Protocol
* @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: Pop3.php 16219 2009-06-21 19:45:39Z thomas $
* @version $Id: Pop3.php 18731 2009-10-29 04:18:19Z yoshida@zend.co.jp $
*/
@ -34,7 +34,7 @@ class Zend_Mail_Protocol_Pop3
* Default timeout in seconds for initiating session
*/
const TIMEOUT_CONNECTION = 30;
/**
* saves if server supports top
* @var null|bool
@ -57,7 +57,7 @@ class Zend_Mail_Protocol_Pop3
/**
* Public constructor
*
* @param string $host hostname of IP address of POP3 server, if given connect() is called
* @param string $host hostname or IP address of POP3 server, if given connect() is called
* @param int|null $port port of POP3 server, null for default (110 or 995 for ssl)
* @param bool|string $ssl use ssl? 'SSL', 'TLS' or false
* @throws Zend_Mail_Protocol_Exception
@ -82,7 +82,7 @@ class Zend_Mail_Protocol_Pop3
/**
* Open connection to POP3 server
*
* @param string $host hostname of IP address of POP3 server
* @param string $host hostname or IP address of POP3 server
* @param int|null $port of POP3 server, default is 110 (995 for ssl)
* @param string|bool $ssl use 'SSL', 'TLS' or false
* @return string welcome message
@ -106,7 +106,8 @@ class Zend_Mail_Protocol_Pop3
* @see Zend_Mail_Protocol_Exception
*/
require_once 'Zend/Mail/Protocol/Exception.php';
throw new Zend_Mail_Protocol_Exception('cannot connect to host : ' . $errno . ' : ' . $errstr);
throw new Zend_Mail_Protocol_Exception('cannot connect to host; error = ' . $errstr .
' (errno = ' . $errno . ' )');
}
$welcome = $this->readResponse();

View File

@ -12,13 +12,13 @@
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
*
* @category Zend
* @package Zend_Mail
* @subpackage Protocol
* @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: Smtp.php 16219 2009-06-21 19:45:39Z thomas $
* @version $Id: Smtp.php 18951 2009-11-12 16:26:19Z alexander $
*/
@ -38,7 +38,7 @@ require_once 'Zend/Mail/Protocol/Abstract.php';
* Smtp implementation of Zend_Mail_Protocol_Abstract
*
* Minimum implementation according to RFC2821: EHLO, MAIL FROM, RCPT TO, DATA, RSET, NOOP, QUIT
*
*
* @category Zend
* @package Zend_Mail
* @subpackage Protocol

View File

@ -11,13 +11,13 @@
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
*
* @category Zend
* @package Zend_Mail
* @subpackage Protocol
* @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: Crammd5.php 16219 2009-06-21 19:45:39Z thomas $
* @version $Id: Crammd5.php 18951 2009-11-12 16:26:19Z alexander $
*/

View File

@ -11,13 +11,13 @@
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
*
* @category Zend
* @package Zend_Mail
* @subpackage Protocol
* @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: Login.php 16219 2009-06-21 19:45:39Z thomas $
* @version $Id: Login.php 18951 2009-11-12 16:26:19Z alexander $
*/

View File

@ -11,13 +11,13 @@
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
*
* @category Zend
* @package Zend_Mail
* @subpackage Protocol
* @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: Plain.php 16219 2009-06-21 19:45:39Z thomas $
* @version $Id: Plain.php 18951 2009-11-12 16:26:19Z alexander $
*/

View File

@ -11,13 +11,13 @@
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
*
* @category Zend
* @package Zend_Mail
* @subpackage Storage
* @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: Abstract.php 16219 2009-06-21 19:45:39Z thomas $
* @version $Id: Abstract.php 18951 2009-11-12 16:26:19Z alexander $
*/
@ -78,7 +78,7 @@ abstract class Zend_Mail_Storage_Abstract implements Countable, ArrayAccess, See
$var = strtolower(substr($var, 3));
return isset($this->_has[$var]) ? $this->_has[$var] : null;
}
/**
* @see Zend_Mail_Storage_Exception
*/

View File

@ -11,13 +11,13 @@
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
*
* @category Zend
* @package Zend_Mail
* @subpackage Storage
* @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: Exception.php 16219 2009-06-21 19:45:39Z thomas $
* @version $Id: Exception.php 18951 2009-11-12 16:26:19Z alexander $
*/

View File

@ -11,13 +11,13 @@
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
*
* @category Zend
* @package Zend_Mail
* @subpackage Storage
* @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: Folder.php 16219 2009-06-21 19:45:39Z thomas $
* @version $Id: Folder.php 18951 2009-11-12 16:26:19Z alexander $
*/

View File

@ -11,13 +11,13 @@
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
*
* @category Zend
* @package Zend_Mail
* @subpackage Storage
* @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: Interface.php 16219 2009-06-21 19:45:39Z thomas $
* @version $Id: Interface.php 18951 2009-11-12 16:26:19Z alexander $
*/

View File

@ -11,13 +11,13 @@
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
*
* @category Zend
* @package Zend_Mail
* @subpackage Storage
* @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: Maildir.php 16219 2009-06-21 19:45:39Z thomas $
* @version $Id: Maildir.php 18951 2009-11-12 16:26:19Z alexander $
*/

View File

@ -11,13 +11,13 @@
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
*
* @category Zend
* @package Zend_Mail
* @subpackage Storage
* @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: Mbox.php 16219 2009-06-21 19:45:39Z thomas $
* @version $Id: Mbox.php 18951 2009-11-12 16:26:19Z alexander $
*/

View File

@ -11,13 +11,13 @@
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
*
* @category Zend
* @package Zend_Mail
* @subpackage Storage
* @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: Imap.php 16219 2009-06-21 19:45:39Z thomas $
* @version $Id: Imap.php 18951 2009-11-12 16:26:19Z alexander $
*/
@ -123,7 +123,7 @@ class Zend_Mail_Storage_Imap extends Zend_Mail_Storage_Abstract
if ($flags === null) {
return count($this->_protocol->search(array('ALL')));
}
$params = array();
foreach ((array)$flags as $flag) {
if (isset(self::$_searchFlags[$flag])) {

View File

@ -11,13 +11,13 @@
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
*
* @category Zend
* @package Zend_Mail
* @subpackage Storage
* @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: Maildir.php 16219 2009-06-21 19:45:39Z thomas $
* @version $Id: Maildir.php 18951 2009-11-12 16:26:19Z alexander $
*/
@ -71,7 +71,7 @@ class Zend_Mail_Storage_Maildir extends Zend_Mail_Storage_Abstract
'R' => Zend_Mail_Storage::FLAG_ANSWERED,
'S' => Zend_Mail_Storage::FLAG_SEEN,
'T' => Zend_Mail_Storage::FLAG_DELETED);
// TODO: getFlags($id) for fast access if headers are not needed (i.e. just setting flags)?
/**
@ -86,7 +86,7 @@ class Zend_Mail_Storage_Maildir extends Zend_Mail_Storage_Abstract
return count($this->_files);
}
$count = 0;
$count = 0;
if (!is_array($flags)) {
foreach ($this->_files as $file) {
if (isset($file['flaglookup'][$flags])) {
@ -95,7 +95,7 @@ class Zend_Mail_Storage_Maildir extends Zend_Mail_Storage_Abstract
}
return $count;
}
$flags = array_flip($flags);
foreach ($this->_files as $file) {
foreach ($flags as $flag => $v) {
@ -179,7 +179,7 @@ class Zend_Mail_Storage_Maildir extends Zend_Mail_Storage_Abstract
return new $this->_messageClass(array('file' => $this->_getFileData($id, 'filename'),
'flags' => $this->_getFileData($id, 'flags')));
}
return new $this->_messageClass(array('handler' => $this, 'id' => $id, 'headers' => $this->getRawHeader($id),
'flags' => $this->_getFileData($id, 'flags')));
}

View File

@ -11,13 +11,13 @@
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
*
* @category Zend
* @package Zend_Mail
* @subpackage Storage
* @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: Mbox.php 16219 2009-06-21 19:45:39Z thomas $
* @version $Id: Mbox.php 18951 2009-11-12 16:26:19Z alexander $
*/
@ -224,7 +224,7 @@ class Zend_Mail_Storage_Mbox extends Zend_Mail_Storage_Abstract
if (is_array($params)) {
$params = (object)$params;
}
if (!isset($params->filename) /* || Zend_Loader::isReadable($params['filename']) */) {
/**
* @see Zend_Mail_Storage_Exception

View File

@ -11,13 +11,13 @@
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
*
* @category Zend
* @package Zend_Mail
* @subpackage Storage
* @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: Pop3.php 16219 2009-06-21 19:45:39Z thomas $
* @version $Id: Pop3.php 18951 2009-11-12 16:26:19Z alexander $
*/
@ -244,7 +244,7 @@ class Zend_Mail_Storage_Pop3 extends Zend_Mail_Storage_Abstract
}
$count = $this->countMessages();
if ($count < 1) {
return array();
return array();
}
$range = range(1, $count);
return array_combine($range, $range);

View File

@ -11,13 +11,13 @@
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
*
* @category Zend
* @package Zend_Mail
* @subpackage Storage
* @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: Interface.php 16219 2009-06-21 19:45:39Z thomas $
* @version $Id: Interface.php 18951 2009-11-12 16:26:19Z alexander $
*/

View File

@ -11,13 +11,13 @@
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
*
* @category Zend
* @package Zend_Mail
* @subpackage Storage
* @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: Maildir.php 16219 2009-06-21 19:45:39Z thomas $
* @version $Id: Maildir.php 18951 2009-11-12 16:26:19Z alexander $
*/
@ -49,7 +49,7 @@ class Zend_Mail_Storage_Writable_Maildir extends Zend_Mail_Storage_Folder_Mai
* @var bool|int
*/
protected $_quota;
/**
* create a new maildir
*
@ -85,7 +85,7 @@ class Zend_Mail_Storage_Writable_Maildir extends Zend_Mail_Storage_Folder_Mai
}
}
}
foreach (array('cur', 'tmp', 'new') as $subdir) {
if (!@mkdir($dir . DIRECTORY_SEPARATOR . $subdir)) {
// ignore if dir exists (i.e. was already valid maildir or two processes try to create one)
@ -99,7 +99,7 @@ class Zend_Mail_Storage_Writable_Maildir extends Zend_Mail_Storage_Folder_Mai
}
}
}
/**
* Create instance with parameters
* Additional parameters are (see parent for more):
@ -112,11 +112,11 @@ class Zend_Mail_Storage_Writable_Maildir extends Zend_Mail_Storage_Folder_Mai
if (is_array($params)) {
$params = (object)$params;
}
if (!empty($params->create) && isset($params->dirname) && !file_exists($params->dirname . DIRECTORY_SEPARATOR . 'cur')) {
self::initMaildir($params->dirname);
}
parent::__construct($params);
}
@ -546,7 +546,7 @@ class Zend_Mail_Storage_Writable_Maildir extends Zend_Mail_Storage_Folder_Mai
* @see Zend_Mail_Storage_Exception
*/
require_once 'Zend/Mail/Storage/Exception.php';
throw new Zend_Mail_Storage_Exception('storage is over quota!');
throw new Zend_Mail_Storage_Exception('storage is over quota!');
}
if ($folder === null) {
@ -619,9 +619,9 @@ class Zend_Mail_Storage_Writable_Maildir extends Zend_Mail_Storage_Folder_Mai
* @see Zend_Mail_Storage_Exception
*/
require_once 'Zend/Mail/Storage/Exception.php';
throw new Zend_Mail_Storage_Exception('storage is over quota!');
throw new Zend_Mail_Storage_Exception('storage is over quota!');
}
if (!($folder instanceof Zend_Mail_Storage_Folder)) {
$folder = $this->getFolders($folder);
}
@ -677,7 +677,7 @@ class Zend_Mail_Storage_Writable_Maildir extends Zend_Mail_Storage_Folder_Mai
'flags' => $flags,
'filename' => $new_file);
}
if ($this->_quota) {
$this->_addQuotaEntry((int)$size, 1);
}
@ -695,7 +695,7 @@ class Zend_Mail_Storage_Writable_Maildir extends Zend_Mail_Storage_Folder_Mai
if (!($folder instanceof Zend_Mail_Storage_Folder)) {
$folder = $this->getFolders($folder);
}
if ($folder->getGlobalName() == $this->_currentFolder
|| ($this->_currentFolder == 'INBOX' && $folder->getGlobalName() == '/')) {
/**
@ -704,7 +704,7 @@ class Zend_Mail_Storage_Writable_Maildir extends Zend_Mail_Storage_Folder_Mai
require_once 'Zend/Mail/Storage/Exception.php';
throw new Zend_Mail_Storage_Exception('target is current folder');
}
$filedata = $this->_getFileData($id);
$old_file = $filedata['filename'];
$flags = $filedata['flags'];
@ -790,11 +790,11 @@ class Zend_Mail_Storage_Writable_Maildir extends Zend_Mail_Storage_Folder_Mai
public function removeMessage($id)
{
$filename = $this->_getFileData($id, 'filename');
if ($this->_quota) {
$size = filesize($filename);
}
if (!@unlink($filename)) {
/**
* @see Zend_Mail_Storage_Exception
@ -809,7 +809,7 @@ class Zend_Mail_Storage_Writable_Maildir extends Zend_Mail_Storage_Folder_Mai
$this->_addQuotaEntry(0 - (int)$size, -1);
}
}
/**
* enable/disable quota and set a quota value if wanted or needed
*
@ -824,7 +824,7 @@ class Zend_Mail_Storage_Writable_Maildir extends Zend_Mail_Storage_Folder_Mai
public function setQuota($value) {
$this->_quota = $value;
}
/**
* get currently set quota
*
@ -855,10 +855,10 @@ class Zend_Mail_Storage_Writable_Maildir extends Zend_Mail_Storage_Folder_Mai
}
return $quota;
}
return $this->_quota;
}
/**
* @see http://www.inter7.com/courierimap/README.maildirquota.html "Calculating maildirsize"
*/
@ -876,7 +876,7 @@ class Zend_Mail_Storage_Writable_Maildir extends Zend_Mail_Storage_Folder_Mai
throw new Zend_Mail_Storage_Exception('no quota defintion found');
}
}
$folders = new RecursiveIteratorIterator($this->getFolders(), RecursiveIteratorIterator::SELF_FIRST);
foreach ($folders as $folder) {
$subdir = $folder->getGlobalName();
@ -888,29 +888,29 @@ class Zend_Mail_Storage_Writable_Maildir extends Zend_Mail_Storage_Folder_Mai
if ($subdir == 'Trash') {
continue;
}
foreach (array('cur', 'new') as $subsubdir) {
$dirname = $this->_rootdir . $subdir . DIRECTORY_SEPARATOR . $subsubdir . DIRECTORY_SEPARATOR;
if (!file_exists($dirname)) {
continue;
}
// NOTE: we are using mtime instead of "the latest timestamp". The latest would be atime
// and as we are accessing the directory it would make the whole calculation useless.
// and as we are accessing the directory it would make the whole calculation useless.
$timestamps[$dirname] = filemtime($dirname);
$dh = opendir($dirname);
// NOTE: Should have been checked in constructor. Not throwing an exception here, quotas will
// NOTE: Should have been checked in constructor. Not throwing an exception here, quotas will
// therefore not be fully enforeced, but next request will fail anyway, if problem persists.
if (!$dh) {
continue;
}
while (($entry = readdir()) !== false) {
if ($entry[0] == '.' || !is_file($dirname . $entry)) {
continue;
}
if (strpos($entry, ',S=')) {
strtok($entry, '=');
$filesize = strtok(':');
@ -930,7 +930,7 @@ class Zend_Mail_Storage_Writable_Maildir extends Zend_Mail_Storage_Folder_Mai
}
}
}
$tmp = $this->_createTmpFile();
$fh = $tmp['handle'];
$definition = array();
@ -951,10 +951,10 @@ class Zend_Mail_Storage_Writable_Maildir extends Zend_Mail_Storage_Folder_Mai
break;
}
}
return array('size' => $total_size, 'count' => $messages, 'quota' => $quota);
}
/**
* @see http://www.inter7.com/courierimap/README.maildirquota.html "Calculating the quota for a Maildir++"
*/
@ -1001,9 +1001,9 @@ class Zend_Mail_Storage_Writable_Maildir extends Zend_Mail_Storage_Folder_Mai
$messages += $count;
}
}
$over_quota = false;
$over_quota = $over_quota || (isset($quota['size']) && $total_size > $quota['size']);
$over_quota = $over_quota || (isset($quota['size']) && $total_size > $quota['size']);
$over_quota = $over_quota || (isset($quota['count']) && $messages > $quota['count']);
// NOTE: $maildirsize equals false if it wasn't set (AKA we recalculated) or it's only
// one line, because $maildirsize[0] gets unsetted.
@ -1015,18 +1015,18 @@ class Zend_Mail_Storage_Writable_Maildir extends Zend_Mail_Storage_Folder_Mai
$messages = $result['count'];
$quota = $result['quota'];
$over_quota = false;
$over_quota = $over_quota || (isset($quota['size']) && $total_size > $quota['size']);
$over_quota = $over_quota || (isset($quota['size']) && $total_size > $quota['size']);
$over_quota = $over_quota || (isset($quota['count']) && $messages > $quota['count']);
}
if ($fh) {
// TODO is there a safe way to keep the handle open for writing?
fclose($fh);
}
return array('size' => $total_size, 'count' => $messages, 'quota' => $quota, 'over_quota' => $over_quota);
}
protected function _addQuotaEntry($size, $count = 1) {
if (!file_exists($this->_rootdir . 'maildirsize')) {
// TODO: should get file handler from _calculateQuota
@ -1035,7 +1035,7 @@ class Zend_Mail_Storage_Writable_Maildir extends Zend_Mail_Storage_Folder_Mai
$count = (int)$count;
file_put_contents($this->_rootdir . 'maildirsize', "$size $count\n", FILE_APPEND);
}
/**
* check if storage is currently over quota
*

View File

@ -17,7 +17,7 @@
* @subpackage Transport
* @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: Abstract.php 17334 2009-08-01 01:25:22Z yoshida@zend.co.jp $
* @version $Id: Abstract.php 18760 2009-10-31 13:09:01Z yoshida@zend.co.jp $
*/
@ -140,7 +140,7 @@ abstract class Zend_Mail_Transport_Abstract
}
$this->_headers['Content-Type'] = array(
$type . '; charset=' . $this->_mail->getCharset() . ';'
$type . ';'
. $this->EOL
. " " . 'boundary="' . $boundary . '"'
);

View File

@ -11,13 +11,13 @@
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
*
* @category Zend
* @package Zend_Mail
* @subpackage Transport
* @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: Exception.php 16219 2009-06-21 19:45:39Z thomas $
* @version $Id: Exception.php 18951 2009-11-12 16:26:19Z alexander $
*/

View File

@ -11,13 +11,13 @@
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
*
* @category Zend
* @package Zend_Mail
* @subpackage Transport
* @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: Sendmail.php 16219 2009-06-21 19:45:39Z thomas $
* @version $Id: Sendmail.php 18951 2009-11-12 16:26:19Z alexander $
*/
@ -164,6 +164,9 @@ class Zend_Mail_Transport_Sendmail extends Zend_Mail_Transport_Abstract
// Prepare headers
parent::_prepareHeaders($headers);
// Fix issue with empty blank line ontop when using Sendmail Trnasport
$this->header = rtrim($this->header);
}
}

View File

@ -11,13 +11,13 @@
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
*
* @category Zend
* @package Zend_Mail
* @subpackage Transport
* @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: Smtp.php 16219 2009-06-21 19:45:39Z thomas $
* @version $Id: Smtp.php 18989 2009-11-15 13:23:41Z yoshida@zend.co.jp $
*/
@ -199,8 +199,8 @@ class Zend_Mail_Transport_Smtp extends Zend_Mail_Transport_Abstract
$this->_connection->rset();
}
// Set mail return path from sender email address
$this->_connection->mail($this->_mail->getReturnPath());
// Set sender email address
$this->_connection->mail($this->_mail->getFrom());
// Set recipient forward paths
foreach ($this->_mail->getRecipients() as $recipient) {