r77562 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77561‎ | r77562 | r77563 >
Date:07:49, 2 December 2010
Author:raymond
Status:ok
Tags:
Comment:
Show username in input field w/o underscores
While I am at it: Update to newer Xml/Html functions
Modified paths:
  • /trunk/phase3/includes/specials/SpecialUserrights.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialUserrights.php
@@ -374,14 +374,13 @@
375375 function switchForm() {
376376 global $wgOut, $wgScript;
377377 $wgOut->addHTML(
378 - Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'name' => 'uluser', 'id' => 'mw-userrights-form1' ) ) .
 378+ Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'name' => 'uluser', 'id' => 'mw-userrights-form1' ) ) .
379379 Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) .
380 - Xml::openElement( 'fieldset' ) .
381 - Xml::element( 'legend', array(), wfMsg( 'userrights-lookup-user' ) ) .
382 - Xml::inputLabel( wfMsg( 'userrights-user-editname' ), 'user', 'username', 30, $this->mTarget ) . ' ' .
 380+ Xml::fieldset( wfMsg( 'userrights-lookup-user' ) ) .
 381+ Xml::inputLabel( wfMsg( 'userrights-user-editname' ), 'user', 'username', 30, str_replace( '_', ' ', $this->mTarget ) ) . ' ' .
383382 Xml::submitButton( wfMsg( 'editusergroup' ) ) .
384 - Xml::closeElement( 'fieldset' ) .
385 - Xml::closeElement( 'form' ) . "\n"
 383+ Html::closeElement( 'fieldset' ) .
 384+ Html::closeElement( 'form' ) . "\n"
386385 );
387386 }
388387

Status & tagging log