]> git.mxchange.org Git - friendica.git/commitdiff
fix boolean field
authornupplaPhil <admin@philipp.info>
Sun, 26 Jan 2020 19:41:53 +0000 (20:41 +0100)
committernupplaPhil <admin@philipp.info>
Sun, 26 Jan 2020 20:35:04 +0000 (21:35 +0100)
src/Object/EMail.php
src/Object/EMail/IEmail.php
src/Util/Emailer.php

index 5985b3f3be2d6c38a8950e1a605aefe798e1a293..496729a15dcfec11208820a01a1d5249683bb870 100644 (file)
@@ -91,9 +91,9 @@ class EMail implements IEmail
        /**
         * {@inheritDoc}
         */
-       public function getMessage(bool $text = false)
+       public function getMessage(bool $plain = false)
        {
-               if ($text) {
+               if ($plain) {
                        return $this->msgText;
                } else {
                        return $this->msgHtml;
index cd654b9d322f0757aca9787ba5adf1ee7eb8a49c..24df41b156f8202d5f2b56be56eca1a75289d842 100644 (file)
@@ -56,11 +56,11 @@ interface IEmail
        /**
         * Gets the message body of this email (either html or plaintext)
         *
-        * @param boolean $text True, if returned as plaintext
+        * @param boolean $plain True, if returned as plaintext
         *
         * @return string
         */
-       function getMessage(bool $text = false);
+       function getMessage(bool $plain = false);
 
        /**
         * Gets any additional mail header
index 9490b5c31ad1c7f01070b218da44442f72b68fe6..f2f1edeccb6c5301961ecb624c1a07774573ba51 100644 (file)
@@ -77,8 +77,8 @@ class Emailer
                                 "Content-Type: multipart/alternative; boundary=\"{$mimeBoundary}\"";
 
                // assemble the final multipart message body with the text and html types included
-               $textBody             = chunk_split(base64_encode($email->getMessage()));
-               $htmlBody             = chunk_split(base64_encode($email->getMessage(true)));
+               $textBody             = chunk_split(base64_encode($email->getMessage(true)));
+               $htmlBody             = chunk_split(base64_encode($email->getMessage()));
                $multipartMessageBody = "--" . $mimeBoundary . "\n" .                    // plain text section
                                        "Content-Type: text/plain; charset=UTF-8\n" .
                                        "Content-Transfer-Encoding: base64\n\n" .