Index: trunk/phase3/includes/specials/SpecialPreferences.php |
— | — | @@ -1246,25 +1246,34 @@ |
1247 | 1247 | |
1248 | 1248 | # Misc |
1249 | 1249 | # |
1250 | | - $wgOut->addHTML('<fieldset><legend>' . wfMsg('prefs-misc') . '</legend>'); |
1251 | | - $wgOut->addHTML( '<label for="wpStubs">' . wfMsg( 'stub-threshold' ) . '</label> ' ); |
1252 | | - $wgOut->addHTML( Xml::input( 'wpStubs', 6, $this->mStubs, array( 'id' => 'wpStubs' ) ) ); |
1253 | | - $msgUnderline = htmlspecialchars( wfMsg ( 'tog-underline' ) ); |
1254 | | - $msgUnderlinenever = htmlspecialchars( wfMsg ( 'underline-never' ) ); |
1255 | | - $msgUnderlinealways = htmlspecialchars( wfMsg ( 'underline-always' ) ); |
1256 | | - $msgUnderlinedefault = htmlspecialchars( wfMsg ( 'underline-default' ) ); |
1257 | | - $uopt = $wgUser->getOption("underline"); |
1258 | | - $s0 = $uopt == 0 ? ' selected="selected"' : ''; |
1259 | | - $s1 = $uopt == 1 ? ' selected="selected"' : ''; |
1260 | | - $s2 = $uopt == 2 ? ' selected="selected"' : ''; |
1261 | | - $wgOut->addHTML(" |
1262 | | -<div class='toggle'><p><label for='wpOpunderline'>$msgUnderline</label> |
1263 | | -<select name='wpOpunderline' id='wpOpunderline'> |
1264 | | -<option value=\"0\"$s0>$msgUnderlinenever</option> |
1265 | | -<option value=\"1\"$s1>$msgUnderlinealways</option> |
1266 | | -<option value=\"2\"$s2>$msgUnderlinedefault</option> |
1267 | | -</select></p></div>"); |
| 1250 | + $uopt = $wgUser->getOption( 'underline' ); |
| 1251 | + $wgOut->addHTML( |
| 1252 | + Xml::fieldset( wfMsg( 'prefs-misc' ) ) . |
| 1253 | + Xml::openElement( 'table' ) . |
| 1254 | + '<tr> |
| 1255 | + <td class="mw-label">' . |
| 1256 | + // Xml::label() cannot be used because 'stub-threshold' contains plain HTML |
| 1257 | + Xml::tags( 'label', array( 'for' => 'wpStubs' ), wfMsg( 'stub-threshold' ) ) . |
| 1258 | + '</td> |
| 1259 | + <td class="mw-input">' . |
| 1260 | + Xml::input( 'wpStubs', 6, $this->mStubs, array( 'id' => 'wpStubs' ) ) . |
| 1261 | + '</td> |
| 1262 | + </tr><tr> |
| 1263 | + <td class="mw-label">' . |
| 1264 | + Xml::label( wfMsg( 'tog-underline' ), 'wpOpunderline' ) . |
| 1265 | + '</td> |
| 1266 | + <td class="mw-input">' . |
| 1267 | + Xml::openElement( 'select', array( 'id' => 'wpOpunderline', 'name' => 'wpOpunderline' ) ) . |
| 1268 | + Xml::option( wfMsg ( 'underline-never' ), '0', $uopt == 0 ) . |
| 1269 | + Xml::option( wfMsg ( 'underline-always' ), '1', $uopt == 1 ) . |
| 1270 | + Xml::option( wfMsg ( 'underline-default' ), '2', $uopt == 2 ) . |
| 1271 | + Xml::closeElement( 'select' ) . |
| 1272 | + '</td> |
| 1273 | + </tr>' . |
| 1274 | + Xml::closeElement( 'table' ) |
| 1275 | + ); |
1268 | 1276 | |
| 1277 | + # And now the rest = Misc. |
1269 | 1278 | foreach ( $togs as $tname ) { |
1270 | 1279 | if( !array_key_exists( $tname, $this->mUsedToggles ) ) { |
1271 | 1280 | if( $tname == 'norollbackdiff' && $wgUser->isAllowed( 'rollback' ) ) |