summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-09-19 15:29:39 +0200
committerFrédéric Guillot <fred@kanboard.net>2014-09-19 15:29:39 +0200
commit0a9a4ba0393d40f3bcba4e4e531bd0d51d2c3aff (patch)
tree1fba352c7d43bda85560874f6e14f32bf3f4ffc8
parentaf69070a647c85b2b4de76a415fc8641dc46c2e8 (diff)
Improve make-archive.sh and update swiftmailer
-rwxr-xr-xscripts/make-archive.sh21
-rw-r--r--vendor/swiftmailer/classes/Swift/Encoding.php64
-rw-r--r--vendor/swiftmailer/classes/Swift/Plugins/RedirectingPlugin.php9
-rw-r--r--vendor/swiftmailer/classes/Swift/Transport/AbstractSmtpTransport.php15
4 files changed, 28 insertions, 81 deletions
diff --git a/scripts/make-archive.sh b/scripts/make-archive.sh
index 7edb90c7..e545b32f 100755
--- a/scripts/make-archive.sh
+++ b/scripts/make-archive.sh
@@ -5,9 +5,24 @@ APP="kanboard"
cd /tmp
rm -rf /tmp/$APP /tmp/$APP-*.zip 2>/dev/null
-git clone https://github.com/fguillot/$APP.git
-rm -rf $APP/data/*.sqlite $APP/.git $APP/.gitignore $APP/scripts $APP/tests $APP/Vagrantfile $APP/.*.yml $APP/phpunit.xml $APP/README.markdown $APP/docs
+git clone --depth 1 https://github.com/fguillot/$APP.git
+
+rm -rf $APP/data/*.sqlite \
+ $APP/.git $APP/.gitignore \
+ $APP/scripts \
+ $APP/tests \
+ $APP/Vagrantfile \
+ $APP/.*.yml \
+ $APP/README.markdown \
+ $APP/docs
+
sed -i.bak s/master/$VERSION/g $APP/app/common.php && rm -f $APP/app/*.bak
zip -r $APP-$VERSION.zip $APP
-mv $APP-*.zip ~/Devel/websites/$APP
+
+mv $APP-$VERSION.zip ~/Devel/websites/$APP
+
+cd ~/Devel/websites/$APP/
+unlink $APP-latest.zip
+ln -s $APP-$VERSION.zip $APP-latest.zip
+
rm -rf /tmp/$APP 2>/dev/null
diff --git a/vendor/swiftmailer/classes/Swift/Encoding.php b/vendor/swiftmailer/classes/Swift/Encoding.php
deleted file mode 100644
index 5cbb20fc..00000000
--- a/vendor/swiftmailer/classes/Swift/Encoding.php
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-
-/*
- * This file is part of SwiftMailer.
- * (c) 2004-2009 Chris Corbyn
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Provides quick access to each encoding type.
- *
- * @author Chris Corbyn
- */
-class Swift_Encoding
-{
- /**
- * Get the Encoder that provides 7-bit encoding.
- *
- * @return Swift_Mime_ContentEncoder
- */
- public static function get7BitEncoding()
- {
- return self::_lookup('mime.7bitcontentencoder');
- }
-
- /**
- * Get the Encoder that provides 8-bit encoding.
- *
- * @return Swift_Mime_ContentEncoder
- */
- public static function get8BitEncoding()
- {
- return self::_lookup('mime.8bitcontentencoder');
- }
-
- /**
- * Get the Encoder that provides Quoted-Printable (QP) encoding.
- *
- * @return Swift_Mime_ContentEncoder
- */
- public static function getQpEncoding()
- {
- return self::_lookup('mime.qpcontentencoder');
- }
-
- /**
- * Get the Encoder that provides Base64 encoding.
- *
- * @return Swift_Mime_ContentEncoder
- */
- public static function getBase64Encoding()
- {
- return self::_lookup('mime.base64contentencoder');
- }
-
- // -- Private Static Methods
-
- private static function _lookup($key)
- {
- return Swift_DependencyContainer::getInstance()->lookup($key);
- }
-}
diff --git a/vendor/swiftmailer/classes/Swift/Plugins/RedirectingPlugin.php b/vendor/swiftmailer/classes/Swift/Plugins/RedirectingPlugin.php
index 90f380bc..21c23829 100644
--- a/vendor/swiftmailer/classes/Swift/Plugins/RedirectingPlugin.php
+++ b/vendor/swiftmailer/classes/Swift/Plugins/RedirectingPlugin.php
@@ -111,8 +111,13 @@ class Swift_Plugins_RedirectingPlugin implements Swift_Events_SendListener
$this->_filterHeaderSet($headers, 'Bcc');
// Add each hard coded recipient
+ $to = $message->getTo();
+ if (null === $to) {
+ $to = array();
+ }
+
foreach ( (array) $this->_recipient as $recipient) {
- if (!array_key_exists($recipient, $message->getTo())) {
+ if (!array_key_exists($recipient, $to)) {
$message->addTo($recipient);
}
}
@@ -190,6 +195,8 @@ class Swift_Plugins_RedirectingPlugin implements Swift_Events_SendListener
if ($headers->has('X-Swift-To')) {
$message->setTo($headers->get('X-Swift-To')->getNameAddresses());
$headers->removeAll('X-Swift-To');
+ } else {
+ $message->setTo(null);
}
if ($headers->has('X-Swift-Cc')) {
diff --git a/vendor/swiftmailer/classes/Swift/Transport/AbstractSmtpTransport.php b/vendor/swiftmailer/classes/Swift/Transport/AbstractSmtpTransport.php
index e5874d28..7771b6bd 100644
--- a/vendor/swiftmailer/classes/Swift/Transport/AbstractSmtpTransport.php
+++ b/vendor/swiftmailer/classes/Swift/Transport/AbstractSmtpTransport.php
@@ -166,13 +166,13 @@ abstract class Swift_Transport_AbstractSmtpTransport implements Swift_Transport
$to = (array) $message->getTo();
$cc = (array) $message->getCc();
+ $tos = array_merge($to, $cc);
$bcc = (array) $message->getBcc();
$message->setBcc(array());
try {
- $sent += $this->_sendTo($message, $reversePath, $to, $failedRecipients);
- $sent += $this->_sendCc($message, $reversePath, $cc, $failedRecipients);
+ $sent += $this->_sendTo($message, $reversePath, $tos, $failedRecipients);
$sent += $this->_sendBcc($message, $reversePath, $bcc, $failedRecipients);
} catch (Exception $e) {
$message->setBcc($bcc);
@@ -444,17 +444,6 @@ abstract class Swift_Transport_AbstractSmtpTransport implements Swift_Transport
$failedRecipients);
}
- /** Send a message to the given Cc: recipients */
- private function _sendCc(Swift_Mime_Message $message, $reversePath, array $cc, array &$failedRecipients)
- {
- if (empty($cc)) {
- return 0;
- }
-
- return $this->_doMailTransaction($message, $reversePath, array_keys($cc),
- $failedRecipients);
- }
-
/** Send a message to all Bcc: recipients */
private function _sendBcc(Swift_Mime_Message $message, $reversePath, array $bcc, array &$failedRecipients)
{