From: Raimond Spekking Date: Mon, 16 Feb 2009 19:19:45 +0000 (+0000) Subject: Prettify code of Special:Preferences#Misc. Use Xml::functions. X-Git-Tag: 1.31.0-rc.0~42865 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22auteur_infos%22%2C%20%22id_auteur=%24id%22%29%20.%20%22?a=commitdiff_plain;h=ab2d02966f0aa6d175cf1c62f44ded31367c8c02;p=lhc%2Fweb%2Fwiklou.git Prettify code of Special:Preferences#Misc. Use Xml::functions. This maybe fixes bug 17482 (Formatting error in "preferences") but I cannot see the effect in my installations. --- diff --git a/includes/specials/SpecialPreferences.php b/includes/specials/SpecialPreferences.php index 84654e1437..f4a42ef48d 100644 --- a/includes/specials/SpecialPreferences.php +++ b/includes/specials/SpecialPreferences.php @@ -1246,25 +1246,34 @@ class PreferencesForm { # Misc # - $wgOut->addHTML('
' . wfMsg('prefs-misc') . ''); - $wgOut->addHTML( ' ' ); - $wgOut->addHTML( Xml::input( 'wpStubs', 6, $this->mStubs, array( 'id' => 'wpStubs' ) ) ); - $msgUnderline = htmlspecialchars( wfMsg ( 'tog-underline' ) ); - $msgUnderlinenever = htmlspecialchars( wfMsg ( 'underline-never' ) ); - $msgUnderlinealways = htmlspecialchars( wfMsg ( 'underline-always' ) ); - $msgUnderlinedefault = htmlspecialchars( wfMsg ( 'underline-default' ) ); - $uopt = $wgUser->getOption("underline"); - $s0 = $uopt == 0 ? ' selected="selected"' : ''; - $s1 = $uopt == 1 ? ' selected="selected"' : ''; - $s2 = $uopt == 2 ? ' selected="selected"' : ''; - $wgOut->addHTML(" -

-

"); + $uopt = $wgUser->getOption( 'underline' ); + $wgOut->addHTML( + Xml::fieldset( wfMsg( 'prefs-misc' ) ) . + Xml::openElement( 'table' ) . + ' + ' . + // Xml::label() cannot be used because 'stub-threshold' contains plain HTML + Xml::tags( 'label', array( 'for' => 'wpStubs' ), wfMsg( 'stub-threshold' ) ) . + ' + ' . + Xml::input( 'wpStubs', 6, $this->mStubs, array( 'id' => 'wpStubs' ) ) . + ' + + ' . + Xml::label( wfMsg( 'tog-underline' ), 'wpOpunderline' ) . + ' + ' . + Xml::openElement( 'select', array( 'id' => 'wpOpunderline', 'name' => 'wpOpunderline' ) ) . + Xml::option( wfMsg ( 'underline-never' ), '0', $uopt == 0 ) . + Xml::option( wfMsg ( 'underline-always' ), '1', $uopt == 1 ) . + Xml::option( wfMsg ( 'underline-default' ), '2', $uopt == 2 ) . + Xml::closeElement( 'select' ) . + ' + ' . + Xml::closeElement( 'table' ) + ); + # And now the rest = Misc. foreach ( $togs as $tname ) { if( !array_key_exists( $tname, $this->mUsedToggles ) ) { if( $tname == 'norollbackdiff' && $wgUser->isAllowed( 'rollback' ) )