Follow-up to #15998: Fixed CGL issue with naming and added exception codes
authorErnesto Baschny <ernst@cron-it.de>
Mon, 29 Nov 2010 22:15:16 +0000 (22:15 +0000)
committerErnesto Baschny <ernst@cron-it.de>
Mon, 29 Nov 2010 22:15:16 +0000 (22:15 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9679 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/mail/class.t3lib_mail_mailer.php
t3lib/mail/class.t3lib_mail_message.php

index efd748a..a12d514 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-11-29  Ernesto Baschny  <ernst@cron-it.de>
+
+       * Follow-up to #15998: Fixed CGL issue with naming and added exception codes
+
 2010-11-29  Francois Suter  <francois@typo3.org>
 
        * Fixed bug #16583: Localization overview has no color-coded status anymore
index 50bdea0..b5b7bac 100644 (file)
@@ -41,7 +41,7 @@ require_once(PATH_typo3 . 'contrib/swiftmailer/swift_required.php');
  * @package TYPO3
  * @subpackage t3lib
  */
-class t3lib_mail_mailer extends Swift_Mailer {
+class t3lib_mail_Mailer extends Swift_Mailer {
 
        /**
         * @var Swift_Transport
@@ -61,7 +61,7 @@ class t3lib_mail_mailer extends Swift_Mailer {
                        try {
                                $this->initializeTransport();
                        } catch (Exception $e) {
-                               throw new t3lib_exception($e->getMessage());
+                               throw new t3lib_exception($e->getMessage(), 1291068569);
                        }
                }
                parent::__construct($this->transport);
@@ -81,7 +81,7 @@ class t3lib_mail_mailer extends Swift_Mailer {
         *
         * $TYPO3_CONF_VARS['MAIL']['transport_sendmail_command'] = '/usr/sbin/sendmail -bs'
         *
-        * @throws Exception
+        * @throws t3lib_exception
         */
        private function initializeTransport() {
                $mailSettings = $GLOBALS['TYPO3_CONF_VARS']['MAIL'];
@@ -91,7 +91,10 @@ class t3lib_mail_mailer extends Swift_Mailer {
                                        // Get settings to be used when constructing the transport object
                                list($host, $port) = split(':', $mailSettings['transport_smtp_server']);
                                if ($host === '') {
-                                       throw new t3lib_exception('$TYPO3_CONF_VARS[\'MAIL\'][\'transport_smtp_server\'] needs to be set when transport is set to "smtp"');
+                                       throw new t3lib_exception(
+                                               '$TYPO3_CONF_VARS[\'MAIL\'][\'transport_smtp_server\'] needs to be set when transport is set to "smtp"',
+                                               1291068606
+                                       );
                                }
                                if ($port === '') {
                                        $port = '25';
@@ -115,7 +118,10 @@ class t3lib_mail_mailer extends Swift_Mailer {
                        case 'sendmail':
                                $sendmailCommand = $mailSettings['transport_sendmail_command'];
                                if ($sendmailCommand === '') {
-                                       throw new t3lib_exception('$TYPO3_CONF_VARS[\'MAIL\'][\'transport_sendmail_command\'] needs to be set when transport is set to "sendmail"');
+                                       throw new t3lib_exception(
+                                               '$TYPO3_CONF_VARS[\'MAIL\'][\'transport_sendmail_command\'] needs to be set when transport is set to "sendmail"',
+                                               1291068620
+                                       );
                                }
                                        // Create our transport
                                $this->transport = Swift_SendmailTransport::newInstance($sendmailCommand);
index 1b8552e..f653c6c 100644 (file)
@@ -37,10 +37,10 @@ require_once(PATH_typo3 . 'contrib/swiftmailer/swift_required.php');
  * @package TYPO3
  * @subpackage t3lib
  */
-class t3lib_mail_message extends Swift_Message {
+class t3lib_mail_Message extends Swift_Message {
 
        /**
-        * @var t3lib_mail_mailer
+        * @var t3lib_mail_Mailer
         */
        var $mailer;
 
@@ -61,7 +61,7 @@ class t3lib_mail_message extends Swift_Message {
         * @return void
         */
        private function initializeMailer() {
-               $this->mailer = t3lib_div::makeInstance('t3lib_mail_mailer');
+               $this->mailer = t3lib_div::makeInstance('t3lib_mail_Mailer');
        }
 
        /**