From: Purodha B Blissenbach Date: Wed, 13 Jul 2011 15:57:26 +0000 (+0000) Subject: Fix for r85876 by doing away with a potentially invalid user name parameter behind... X-Git-Tag: 1.31.0-rc.0~28875 X-Git-Url: https://git.cyclocoop.org/?a=commitdiff_plain;ds=sidebyside;h=9b3cc7b8d4faa23457bbc75d3adf31713f836d6f;p=lhc%2Fweb%2Fwiklou.git Fix for r85876 by doing away with a potentially invalid user name parameter behind slash in Special:EmailUser --- diff --git a/includes/specials/SpecialEmailuser.php b/includes/specials/SpecialEmailuser.php index 90cfe10b71..b432a98781 100644 --- a/includes/specials/SpecialEmailuser.php +++ b/includes/specials/SpecialEmailuser.php @@ -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' ) .