r44717 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44716‎ | r44717 | r44718 >
Date:15:01, 17 December 2008
Author:raymond
Status:ok
Tags:
Comment:
Prettify files tab of Special:Preferences a bit
Modified paths:
  • /trunk/phase3/includes/specials/SpecialPreferences.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialPreferences.php
@@ -833,10 +833,6 @@
834834
835835 # Files
836836 #
837 - $wgOut->addHTML(
838 - "<fieldset>\n" . Xml::element( 'legend', null, wfMsg( 'files' ) ) . "\n"
839 - );
840 -
841837 $imageLimitOptions = null;
842838 foreach ( $wgImageLimits as $index => $limits ) {
843839 $selected = ($index == $this->mImageSize);
@@ -844,14 +840,6 @@
845841 wfMsg('unit-pixel'), $index, $selected );
846842 }
847843
848 - $imageSizeId = 'wpImageSize';
849 - $wgOut->addHTML(
850 - "<div>" . Xml::label( wfMsg('imagemaxsize'), $imageSizeId ) . " " .
851 - Xml::openElement( 'select', array( 'name' => $imageSizeId, 'id' => $imageSizeId ) ) .
852 - $imageLimitOptions .
853 - Xml::closeElement( 'select' ) . "</div>\n"
854 - );
855 -
856844 $imageThumbOptions = null;
857845 foreach ( $wgThumbLimits as $index => $size ) {
858846 $selected = ($index == $this->mThumbSize);
@@ -859,16 +847,34 @@
860848 $selected);
861849 }
862850
 851+ $imageSizeId = 'wpImageSize';
863852 $thumbSizeId = 'wpThumbSize';
864853 $wgOut->addHTML(
865 - "<div>" . Xml::label( wfMsg('thumbsize'), $thumbSizeId ) . " " .
866 - Xml::openElement( 'select', array( 'name' => $thumbSizeId, 'id' => $thumbSizeId ) ) .
867 - $imageThumbOptions .
868 - Xml::closeElement( 'select' ) . "</div>\n"
 854+ Xml::fieldset( wfMsg( 'files' ) ) . "\n" .
 855+ Xml::openElement( 'table' ) .
 856+ '<tr>
 857+ <td class="mw-label">' .
 858+ Xml::label( wfMsg( 'imagemaxsize' ), $imageSizeId ) .
 859+ '</td>
 860+ <td class="mw-input">' .
 861+ Xml::openElement( 'select', array( 'name' => $imageSizeId, 'id' => $imageSizeId ) ) .
 862+ $imageLimitOptions .
 863+ Xml::closeElement( 'select' ) .
 864+ '</td>
 865+ </tr><tr>
 866+ <td class="mw-label">' .
 867+ Xml::label( wfMsg( 'thumbsize' ), $thumbSizeId ) .
 868+ '</td>
 869+ <td class="mw-input">' .
 870+ Xml::openElement( 'select', array( 'name' => $thumbSizeId, 'id' => $thumbSizeId ) ) .
 871+ $imageThumbOptions .
 872+ Xml::closeElement( 'select' ) .
 873+ '</td>
 874+ </tr>' .
 875+ Xml::closeElement( 'table' ) .
 876+ Xml::closeElement( 'fieldset' )
869877 );
870878
871 - $wgOut->addHTML( "</fieldset>\n\n" );
872 -
873879 # Date format
874880 #
875881 # Date/Time

Status & tagging log