diff --git a/lib/plugins/sfDoctrinePlugin/lib/mailer/Swift_DoctrineSpool.class.php b/lib/plugins/sfDoctrinePlugin/lib/mailer/Swift_DoctrineSpool.class.php index 01a520ec6..d7967ff2c 100644 --- a/lib/plugins/sfDoctrinePlugin/lib/mailer/Swift_DoctrineSpool.class.php +++ b/lib/plugins/sfDoctrinePlugin/lib/mailer/Swift_DoctrineSpool.class.php @@ -23,7 +23,7 @@ * @author Fabien Potencier * @version SVN: $Id$ */ -class Swift_DoctrineSpool extends Swift_ConfigurableSpool +class Swift_DoctrineSpool extends Swift_DoctrineSpoolAdapter { protected $model = null, @@ -71,9 +71,9 @@ public function stop() /** * Stores a message in the queue. * - * @param Swift_Mime_Message $message The message to store + * @param $message The message to store */ - public function queueMessage(Swift_Mime_Message $message) + protected function internalQueueMessage($message) { $object = new $this->model; @@ -84,7 +84,7 @@ public function queueMessage(Swift_Mime_Message $message) $object->{$this->column} = serialize($message); $object->save(); - + $object->free(true); } diff --git a/lib/plugins/sfDoctrinePlugin/lib/mailer/Swift_DoctrineSpoolAdapter.php b/lib/plugins/sfDoctrinePlugin/lib/mailer/Swift_DoctrineSpoolAdapter.php new file mode 100644 index 000000000..ad0a8a850 --- /dev/null +++ b/lib/plugins/sfDoctrinePlugin/lib/mailer/Swift_DoctrineSpoolAdapter.php @@ -0,0 +1,21 @@ += 0) { + abstract class Swift_DoctrineSpoolAdapter extends Swift_DoctrineSpoolBase + { + public function queueMessage(Swift_Mime_SimpleMessage $message) + { + $this->internalQueueMessage($message); + } + } +} else { + abstract class Swift_DoctrineSpoolAdapter extends Swift_DoctrineSpoolBase + { + public function queueMessage(Swift_Mime_Message $message) + { + $this->internalQueueMessage($message); + } + } +} diff --git a/lib/plugins/sfDoctrinePlugin/lib/mailer/Swift_DoctrineSpoolBase.php b/lib/plugins/sfDoctrinePlugin/lib/mailer/Swift_DoctrineSpoolBase.php new file mode 100644 index 000000000..2258fc8f2 --- /dev/null +++ b/lib/plugins/sfDoctrinePlugin/lib/mailer/Swift_DoctrineSpoolBase.php @@ -0,0 +1,6 @@ +