From 9b3cc7b8d4faa23457bbc75d3adf31713f836d6f Mon Sep 17 00:00:00 2001 From: Purodha B Blissenbach Date: Wed, 13 Jul 2011 15:57:26 +0000 Subject: [PATCH] Fix for r85876 by doing away with a potentially invalid user name parameter behind slash in Special:EmailUser --- includes/specials/SpecialEmailuser.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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' ) . -- 2.20.1