From c1da11c6a3b4ac55ace75a0854954149838e0120 Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Thu, 2 Dec 2010 07:49:10 +0000 Subject: [PATCH] Show username in input field w/o underscores While I am at it: Update to newer Xml/Html functions --- includes/specials/SpecialUserrights.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/includes/specials/SpecialUserrights.php b/includes/specials/SpecialUserrights.php index 050b81e16c..6ea8668b80 100644 --- a/includes/specials/SpecialUserrights.php +++ b/includes/specials/SpecialUserrights.php @@ -374,14 +374,13 @@ class UserrightsPage extends SpecialPage { function switchForm() { global $wgOut, $wgScript; $wgOut->addHTML( - Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'name' => 'uluser', 'id' => 'mw-userrights-form1' ) ) . + Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'name' => 'uluser', 'id' => 'mw-userrights-form1' ) ) . Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) . - Xml::openElement( 'fieldset' ) . - Xml::element( 'legend', array(), wfMsg( 'userrights-lookup-user' ) ) . - Xml::inputLabel( wfMsg( 'userrights-user-editname' ), 'user', 'username', 30, $this->mTarget ) . ' ' . + Xml::fieldset( wfMsg( 'userrights-lookup-user' ) ) . + Xml::inputLabel( wfMsg( 'userrights-user-editname' ), 'user', 'username', 30, str_replace( '_', ' ', $this->mTarget ) ) . ' ' . Xml::submitButton( wfMsg( 'editusergroup' ) ) . - Xml::closeElement( 'fieldset' ) . - Xml::closeElement( 'form' ) . "\n" + Html::closeElement( 'fieldset' ) . + Html::closeElement( 'form' ) . "\n" ); } -- 2.20.1