Improve parameter order in RecipientAwareTextMimePart
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 2 Jun 2016 20:35:15 +0000 (22:35 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 28 Jul 2016 20:06:18 +0000 (22:06 +0200)
wcfsetup/install/files/lib/system/email/mime/HtmlTextMimePart.class.php
wcfsetup/install/files/lib/system/email/mime/PlainTextMimePart.class.php
wcfsetup/install/files/lib/system/email/mime/RecipientAwareTextMimePart.class.php

index bfaabad003658fd4508850e89076327631bfc2f9..803f967c985b61a7030d7cea6bf6b2f983a66d8b 100644 (file)
@@ -17,6 +17,6 @@ class HtmlTextMimePart extends RecipientAwareTextMimePart {
         * @param       string  $content        Content of this text part.
         */
        public function __construct($content) {
-               parent::__construct($content, 'text/html', 'email_html');
+               parent::__construct('text/html', 'email_html', 'wcf', $content);
        }
 }
index 3e3ba8494c633ca7769e5269d6dd187d133fcedc..e72c50b07c7a458166fb3b5fa2fd2207b9678fdd 100644 (file)
@@ -17,6 +17,6 @@ class PlainTextMimePart extends RecipientAwareTextMimePart {
         * @param       string  $content        Content of this text part.
         */
        public function __construct($content) {
-               parent::__construct($content, 'text/plain', 'email_plaintext');
+               parent::__construct('text/plain', 'email_plaintext', 'wcf', $content);
        }
 }
index 14c4d7fbc90be6fc1536f49a5754ae323d8fe7c0..405a28b0faa860074afe57df9204db3a01842b2d 100644 (file)
@@ -39,12 +39,12 @@ class RecipientAwareTextMimePart extends TextMimePart implements IRecipientAware
        /**
         * Creates a new AbstractRecipientAwareTextMimePart.
         * 
-        * @param       string  $content        Content of this text part (this is passed to the template).
         * @param       string  $mimeType       Mime type to provide in the email. You *must* not provide a charset. UTF-8 will be used automatically.
         * @param       string  $template       Template to evaluate
         * @param       string  $application    Application of the template to evaluate (default: wcf)
+        * @param       string  $content        Content of this text part (this is passed to the template).
         */
-       public function __construct($content, $mimeType, $template, $application = 'wcf') {
+       public function __construct($mimeType, $template, $application = 'wcf', $content = '') {
                parent::__construct($content, $mimeType);
                
                $this->template = $template;