Merge "tests: Add PHPUnit tests for methods in MagicWordFactory::class"
[lhc/web/wiklou.git] / includes / mail / EmailNotification.php
index 3144504..739dbec 100644 (file)
@@ -23,8 +23,8 @@
  * @author Tim Starling
  * @author Luke Welling lwelling@wikimedia.org
  */
-use MediaWiki\Linker\LinkTarget;
 
+use MediaWiki\Linker\LinkTarget;
 use MediaWiki\MediaWikiServices;
 
 /**
@@ -342,8 +342,8 @@ class EmailNotification {
 
                $keys['$PAGETITLE'] = $this->title->getPrefixedText();
                $keys['$PAGETITLE_URL'] = $this->title->getCanonicalURL();
-               $keys['$PAGEMINOREDIT'] = $this->minorEdit ?
-                       wfMessage( 'enotif_minoredit' )->inContentLanguage()->text() : '';
+               $keys['$PAGEMINOREDIT'] = "\n" . ( $this->minorEdit ?
+                       wfMessage( 'enotif_minoredit' )->inContentLanguage()->text() : '' );
                $keys['$UNWATCHURL'] = $this->title->getCanonicalURL( 'action=unwatch' );
 
                if ( $this->editor->isAnon() ) {
@@ -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 ) {