Re-implement "Email user footer,"
authorChad Horohoe <demon@users.mediawiki.org>
Sat, 5 Jul 2008 14:43:56 +0000 (14:43 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Sat, 5 Jul 2008 14:43:56 +0000 (14:43 +0000)
* Now grabs message from global language instead of user's UI lang.
* Added a separator between msg and footer
* Shortened message
* Removed a bunch of useless params from the previous incarnation of this.

includes/specials/SpecialEmailuser.php
languages/messages/MessagesEn.php

index d6f7151..8fc900c 100644 (file)
@@ -148,7 +148,8 @@ class EmailUserForm {
                $from = new MailAddress( $wgUser );
                $subject = $this->subject;
 
-               $prefsTitle = Title::newFromText( 'Preferences', NS_SPECIAL );
+               // Add a standard footer
+               $this->text = $this->text . "\n ---- \n" . wfMsgForContent( 'emailuserfooter', array( $from->name, $to->name ) );
                
                if( wfRunHooks( 'EmailUser', array( &$to, &$from, &$subject, &$this->text ) ) ) {
 
index 02b06be..9bef1f4 100644 (file)
@@ -2038,6 +2038,7 @@ The e-mail address you entered in your user preferences will appear as the "From
 'emailccsubject'  => 'Copy of your message to $1: $2',
 'emailsent'       => 'E-mail sent',
 'emailsenttext'   => 'Your e-mail message has been sent.',
+'emailuserfooter' => 'This e-mail was sent by $1 to $2 by the "Email user" function at {{SITENAME}}.',
 
 # Watchlist
 'watchlist'            => 'My watchlist',