Skip to content

Commit

Permalink
Upgrade SwiftMailer to 4.1.2, bug fixes [#340 state:resolved mileston…
Browse files Browse the repository at this point in the history
…e:2.0.1]
  • Loading branch information
dleffler committed Sep 20, 2011
1 parent 1c1556b commit 870393c
Show file tree
Hide file tree
Showing 14 changed files with 50 additions and 70 deletions.
4 changes: 2 additions & 2 deletions external/ExtPrograms.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Program,Version,URL,Avail version,Exponent Customization Notes:
Ckeditor,3.6.1,ckeditor.com,3.6.1,ckeditor.js - delete the '#' part
Ckeditor,3.6.2,ckeditor.com,3.6.2,ckeditor.js - delete the '#' part
FlowPlayer,3.2.7,flowplayer.org,3.2.7,
Swift,4.1.1,swiftmailer.org,4.1.1,
Swift,4.1.2,swiftmailer.org,4.1.2,
ups-php,0.2,code.google.com/p/ups-php,0.2,
fedex-php,9.0.0,,,
swfobject,2.2,code.google.com/p/swfobject,2.2,
Expand Down
17 changes: 17 additions & 0 deletions external/Swift-4/CHANGES
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
Changelog since Version 4.1.x
=============================

4.1.2 (2011-09-13)
------------------

* fixed wrong detection of magic_quotes_runtime
* fixed fatal errors when no To or Subject header has been set
* fixed charset on parameter header continuations
* added documentation about how to install Swiftmailer from the PEAR channel
* fixed various typos and markup problem in the documentation
* fixed warning when cache directory does not exist
* fixed "slashes are escaped" bug
* changed require_once() to require() in autoload

4.1.1 (2011-07-04)
------------------

* added missing file in PEAR package

4.1.0 (2011-06-30)
------------------

Expand Down
4 changes: 2 additions & 2 deletions external/Swift-4/README
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ It is released under the LGPL license.
Homepage: http://swiftmailer.org
Documentation: http://swiftmailer.org/docs
Mailing List: http://groups.google.com/group/swiftmailer
Bugs: http://swiftmailer.lighthouseapp.com/
Repository: http://github.com/swiftmailer/swiftmailer
Bugs: https://github.com/swiftmailer/swiftmailer/issues
Repository: https://github.com/swiftmailer/swiftmailer

Swift Mailer is highly object-oriented by design and lends itself
to use in complex web application with a great deal of flexibility.
Expand Down
2 changes: 1 addition & 1 deletion external/Swift-4/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Swift-4.1.1
Swift-4.1.2
4 changes: 2 additions & 2 deletions external/Swift-4/lib/classes/Swift.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ abstract class Swift
static $initPath;

/** Swift Mailer Version number generated during dist release process */
const VERSION = '4.1.1';
const VERSION = '4.1.2';

/**
* Internal autoloader for spl_autoload_register().
Expand Down Expand Up @@ -50,7 +50,7 @@ public static function autoload($class)
require self::$initPath;
}

require_once $path;
require $path;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ abstract class Swift_ByteStream_AbstractFilterableInputStream
{

/** Write sequence */
public $_sequence = 0;
private $_sequence = 0;

/** StreamFilters */
private $_filters = array();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ public function __construct($path, $writable = false)
{
$this->_path = $path;
$this->_mode = $writable ? 'w+b' : 'rb';
$this->_quotes = ini_get('magic_quotes_runtime');

if (function_exists('get_magic_quotes_runtime') && @get_magic_quotes_runtime() == 1)
{
$this->_quotes = true;
}
}

/**
Expand Down
11 changes: 9 additions & 2 deletions external/Swift-4/lib/classes/Swift/KeyCache/DiskKeyCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ public function __construct(Swift_KeyCache_KeyCacheInputStream $stream, $path)
{
$this->_stream = $stream;
$this->_path = $path;
$this->_quotes = ini_get('magic_quotes_runtime');

if (function_exists('get_magic_quotes_runtime') && @get_magic_quotes_runtime() == 1)
{
$this->_quotes = true;
}
}

/**
Expand Down Expand Up @@ -250,7 +254,10 @@ public function clearAll($nsKey)
{
$this->clearKey($nsKey, $itemKey);
}
rmdir($this->_path . '/' . $nsKey);
if (is_dir($this->_path . '/' . $nsKey))
{
rmdir($this->_path . '/' . $nsKey);
}
unset($this->_keys[$nsKey]);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ private function _createParameter($name, $value)
foreach ($valueLines as $i => $line)
{
$paramLines[] = $name . '*' . $i .
$this->_getEndOfParameterValue($line, $encoded, $i == 0);
$this->_getEndOfParameterValue($line, true, $i == 0);
}
return implode(";\r\n ", $paramLines);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,7 @@ public function getFieldBody()
if (!$this->getCachedValue())
{
$this->setCachedValue(
str_replace('\\', '\\\\', $this->encodeWords(
$this, $this->_value
))
$this->encodeWords($this, $this->_value)
);
}
return $this->getCachedValue();
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,14 @@ public function send(Swift_Mime_Message $message, &$failedRecipients = null)
$toHeader = $message->getHeaders()->get('To');
$subjectHeader = $message->getHeaders()->get('Subject');

if (!$toHeader)
{
throw new Swift_TransportException(
'Cannot send message without a recipient'
);
}
$to = $toHeader->getFieldBody();
$subject = $subjectHeader->getFieldBody();
$subject = $subjectHeader ? $subjectHeader->getFieldBody() : '';

$reversePath = $this->_getReversePath($message);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ private function _establishSocketConnection()
{
$options['socket']['bindto']=$this->_params['sourceIp'].':0';
}
if (!$this->_stream = @stream_socket_client($host.':'.$this->_params['port'], $errno, $errstr, $timeout, STREAM_CLIENT_CONNECT, stream_context_create($options)))
if (!$this->_stream = stream_socket_client($host.':'.$this->_params['port'], $errno, $errstr, $timeout, STREAM_CLIENT_CONNECT, stream_context_create($options)))
{
throw new Swift_TransportException(
'Connection could not be established with host ' . $this->_params['host'] .
Expand Down
2 changes: 1 addition & 1 deletion external/Swift-4/lib/dependency_maps/mime_deps.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
-> asValue('utf-8')

-> register('mime.grammar')
-> asNewInstanceOf('Swift_Mime_Grammar')
-> asSharedInstanceOf('Swift_Mime_Grammar')

-> register('mime.message')
-> asNewInstanceOf('Swift_Mime_SimpleMessage')
Expand Down

0 comments on commit 870393c

Please sign in to comment.