]> git.mxchange.org Git - friendica.git/commitdiff
Fix storing mail settings
authorMichael <heluecht@pirati.ca>
Sat, 5 Mar 2022 13:08:09 +0000 (13:08 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 5 Mar 2022 13:08:09 +0000 (13:08 +0000)
mod/settings.php
src/Protocol/Email.php

index 2c9dcac126c35d64b3beb646ba9efff357d1f9f8..41a1436e69afe94e8c1d1cd87c241a1c49d6f587 100644 (file)
@@ -108,7 +108,7 @@ function settings_post(App $a)
                                        'port'         => $mail_port,
                                        'ssltype'      => $mail_ssl,
                                        'user'         => $mail_user,
-                                       `action`       => $mail_action,
+                                       'action'       => $mail_action,
                                        'movetofolder' => $mail_movetofolder,
                                        'mailbox'      => 'INBOX',
                                        'reply_to'     => $mail_replyto,
index 09792935e0bb9bddf7e1293f6d8c0dd1fb716819..18af77b3feeeb846abc3589b5715d8bf0074e1ab 100644 (file)
@@ -27,6 +27,7 @@ use Friendica\Content\Text\BBCode;
 use Friendica\Content\Text\HTML;
 use Friendica\Model\Item;
 use Friendica\Util\Strings;
+use \IMAP\Connection;
 
 /**
  * Email class
@@ -37,7 +38,7 @@ class Email
         * @param string $mailbox  The mailbox name
         * @param string $username The username
         * @param string $password The password
-        * @return resource
+        * @return Connection
         * @throws \Exception
         */
        public static function connect($mailbox, $username, $password)
@@ -50,7 +51,7 @@ class Email
 
                $errors = imap_errors();
                if (!empty($errors)) {
-                       Logger::notice('IMAP Errors occured', ['errora' => $errors]);
+                       Logger::notice('IMAP Errors occured', ['errors' => $errors]);
                }
 
                $alerts = imap_alerts();
@@ -62,8 +63,8 @@ class Email
        }
 
        /**
-        * @param resource $mbox       mailbox
-        * @param string   $email_addr email
+        * @param Connection $mbox       mailbox
+        * @param string     $email_addr email
         * @return array
         * @throws \Exception
         */
@@ -112,8 +113,8 @@ class Email
        }
 
        /**
-        * @param resource $mbox mailbox
-        * @param integer  $uid  user id
+        * @param Connection $mbox mailbox
+        * @param integer    $uid  user id
         * @return mixed
         */
        public static function messageMeta($mbox, $uid)
@@ -123,9 +124,9 @@ class Email
        }
 
        /**
-        * @param resource $mbox  mailbox
-        * @param integer  $uid   user id
-        * @param string   $reply reply
+        * @param Connection $mbox  mailbox
+        * @param integer    $uid   user id
+        * @param string     $reply reply
         * @return array
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
@@ -210,11 +211,11 @@ class Email
        /**
         * fetch the specified message part number with the specified subtype
         *
-        * @param resource $mbox    mailbox
-        * @param integer  $uid     user id
-        * @param object   $p       parts
-        * @param integer  $partno  part number
-        * @param string   $subtype sub type
+        * @param Connection $mbox    mailbox
+        * @param integer    $uid     user id
+        * @param object     $p       parts
+        * @param integer    $partno  part number
+        * @param string     $subtype sub type
         * @return string
         */
        private static function messageGetPart($mbox, $uid, $p, $partno, $subtype)