mail: Correct return value of sendPersonalised() method
authorAlangi Derick <alangiderick@gmail.com>
Mon, 3 Dec 2018 14:09:14 +0000 (15:09 +0100)
committerD3r1ck01 <alangiderick@gmail.com>
Mon, 3 Dec 2018 16:23:25 +0000 (16:23 +0000)
If email is not successfully sent, return Status (with appropriate
status error) and also, if successfully sent, return Status::newGood().

Change-Id: I602e30641b88614087d9aff83cf8c93e32af7b81

includes/mail/EmailNotification.php

index fa5ebfc..739dbec 100644 (file)
@@ -444,11 +444,12 @@ class EmailNotification {
        /**
         * Does the per-user customizations to a notification e-mail (name,
         * timestamp in proper timezone, etc) and sends it out.
-        * Returns true if the mail was sent successfully.
+        * Returns Status if email was sent successfully or not (Status::newGood()
+        * or Status::newFatal() respectively).
         *
         * @param User $watchingUser
         * @param string $source
-        * @return bool
+        * @return Status
         * @private
         */
        function sendPersonalised( $watchingUser, $source ) {