Fix for r85876 by doing away with a potentially invalid user name parameter behind...
authorPurodha B Blissenbach <purodha@users.mediawiki.org>
Wed, 13 Jul 2011 15:57:26 +0000 (15:57 +0000)
committerPurodha B Blissenbach <purodha@users.mediawiki.org>
Wed, 13 Jul 2011 15:57:26 +0000 (15:57 +0000)
includes/specials/SpecialEmailuser.php

index 90cfe10..b432a98 100644 (file)
@@ -226,10 +226,13 @@ class SpecialEmailUser extends UnlistedSpecialPage {
         * @param $name String: user name submitted.
         * @return String: form asking for user name.
         */
-       static function userForm( $name ) {
-               $string = Xml::openElement( 'form', array( 'method' => 'get', 'action' => '', 'id' => 'askusername' ) ) .
+
+       function userForm( $name ) {
+               global $wgScript ;
+               $string = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'askusername' ) ) .
+                               Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) .
                                Xml::openElement( 'fieldset' ) .
-                               Html::rawElement( 'legend', null, wfMessage( 'emailtarget' )->parse() ) .
+                               Html::rawElement( 'legend', null, wfMessage( 'emailtarget' )->parse() ) .
                                Xml::inputLabel( wfMessage( 'emailusername' )->text(), 'target', 'emailusertarget', 30, $name ) . ' ' .
                                Xml::submitButton( wfMessage( 'emailusernamesubmit' )->text() ) .
                                Xml::closeElement( 'fieldset' ) .