Fixes for r64903:
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sun, 11 Apr 2010 07:57:12 +0000 (07:57 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sun, 11 Apr 2010 07:57:12 +0000 (07:57 +0000)
* changed execute() signature to be compatible with SpecialPage::execute()
* changed $to to $target since the former is not defined at this point, and corrected message name
* removed trailing spaces

includes/specials/SpecialEmailuser.php

index 6bd92a2..83df8b2 100644 (file)
@@ -61,7 +61,7 @@ class SpecialEmailUser extends UnlistedSpecialPage {
                );
        }
        
-       public function execute( $par=null ) {
+       public function execute( $par ) {
                global $wgRequest, $wgOut, $wgUser;
                $this->mTarget = is_null( $par )
                        ? $wgRequest->getVal( 'wpTarget', '' )
@@ -192,7 +192,7 @@ class SpecialEmailUser extends UnlistedSpecialPage {
                if ( $hookErr ) {
                        return $hookErr;
                }
-               
+
                return null;
        }
 
@@ -208,7 +208,7 @@ class SpecialEmailUser extends UnlistedSpecialPage {
 
                $target = self::getTarget( $data['Target'] );
                if( !$target instanceof User ){
-                       return wfMsgExt( $to, 'parse' );
+                       return wfMsgExt( $target . 'text', 'parse' );
                }
                $to = new MailAddress( $target );
                $from = new MailAddress( $wgUser );