Fix grammar in 'mimesearch-summary'
[lhc/web/wiklou.git] / includes / UserMailer.php
index 15d5f77..07cf57d 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Classes used to send e-mails
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
  *
+ * @file
  * @author <brion@pobox.com>
  * @author <mail@tgries.de>
  * @author Tim Starling
- *
  */
 
 
@@ -31,6 +33,7 @@ class MailAddress {
        /**
         * @param $address Mixed: string with an email address, or a User object
         * @param $name String: human-readable name if a string address is given
+        * @param $realName String: human-readable real name if a string address is given
         */
        function __construct( $address, $name = null, $realName = null ) {
                if( is_object( $address ) && $address instanceof User ) {
@@ -358,7 +361,6 @@ class EmailNotification {
                # we use $wgPasswordSender as sender's address
                global $wgEnotifWatchlist;
                global $wgEnotifMinorEdits, $wgEnotifUserTalk;
-               global $wgEnotifImpersonal;
 
                wfProfileIn( __METHOD__ );
 
@@ -367,8 +369,6 @@ class EmailNotification {
                # 2. minor edits (changes) are only regarded if the global flag indicates so
 
                $isUserTalkPage = ($title->getNamespace() == NS_USER_TALK);
-               $enotifusertalkpage = ($isUserTalkPage && $wgEnotifUserTalk);
-               $enotifwatchlistpage = $wgEnotifWatchlist;
 
                $this->title = $title;
                $this->timestamp = $timestamp;
@@ -436,7 +436,7 @@ class EmailNotification {
                $this->composed_common = true;
 
                $summary = ($this->summary == '') ? ' - ' : $this->summary;
-               $medit   = ($this->minorEdit) ? wfMsg( 'minoredit' ) : '';
+               $medit   = ($this->minorEdit) ? wfMsgForContent( 'minoredit' ) : '';
 
                # You as the WikiAdmin and Sysops can make use of plenty of
                # named variables when composing your notification emails while
@@ -466,7 +466,7 @@ class EmailNotification {
                         * revision.
                         */
                        $keys['$NEWPAGE'] = wfMsgForContent('enotif_lastdiff',
-                                       $this->title->getFullURL("oldid={$this->oldid}&diff=prev"));
+                                       $this->title->getFullURL("oldid={$this->oldid}&diff=next"));
 
                $body = strtr( $body, $keys );
                $pagetitle = $this->title->getPrefixedText();
@@ -558,9 +558,8 @@ class EmailNotification {
         * timestamp in proper timezone, etc) and sends it out.
         * Returns true if the mail was sent successfully.
         *
-        * @param User $watchingUser
-        * @param object $mail
-        * @return bool
+        * @param $watchingUser User object
+        * @return Boolean
         * @private
         */
        function sendPersonalised( $watchingUser ) {