r36192 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r36191‎ | r36192 | r36193 >
Date:17:34, 11 June 2008
Author:brion
Status:old
Tags:
Comment:
Let's not go overboard with Xml::tag() for simple <div> and <span>s :)
Modified paths:
  • /trunk/phase3/includes/SpecialUpload.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialUpload.php
@@ -872,8 +872,8 @@
873873 */
874874 function uploadError( $error ) {
875875 global $wgOut;
876 - $wgOut->addHTML( Xml::element( 'h2', null, wfMsg( 'uploadwarning' ) . "\n" ) );
877 - $wgOut->addHTML( Xml::tags( 'span', array( 'class' => 'error' ), $error ) );
 876+ $wgOut->addHTML( '<h2>' . wfMsgHtml( 'uploadwarning' ) . "</h2>\n" ) );
 877+ $wgOut->addHTML( '<span class="error">' . $error . '</span>' ) );
878878 }
879879
880880 /**
@@ -894,8 +894,8 @@
895895 return;
896896 }
897897
898 - $wgOut->addHTML( Xml::element( 'h2', null, wfMsg( 'uploadwarning' ) ) . "\n" );
899 - $wgOut->addHTML( Xml::tags( 'ul', array( 'class' => 'warning' ), $warning ) . "\n" );
 898+ $wgOut->addHTML( '<h2>' . wfMsgHtml( 'uploadwarning' ) . "</h2>\n" );
 899+ $wgOut->addHTML( '<ul class="warning">' . $warning . "</ul>\n" );
900900
901901 $titleObj = SpecialPage::getTitleFor( 'Upload' );
902902
@@ -1041,9 +1041,10 @@
10421042 $val2 = $val;
10431043 }
10441044 $val2 = $wgAllowCopyUploads ? min( $wgMaxUploadSize, $val2 ) : $val2;
1045 - $maxUploadSize = Xml::tags( 'div', array( 'id' => 'mw-upload-maxfilesize' ),
 1045+ $maxUploadSize = '<div id="mw-upload-maxfilesize">' .
10461046 wfMsgExt( 'upload-maxfilesize', array( 'parseinline', 'escapenoentities' ),
1047 - $wgLang->formatSize( $val2 ) ) )."\n";
 1047+ $wgLang->formatSize( $val2 ) ) ) .
 1048+ "</div>\n";
10481049
10491050 $sourcefilename = wfMsgExt( 'sourcefilename', array( 'parseinline', 'escapenoentities' ) );
10501051 $destfilename = wfMsgExt( 'destfilename', array( 'parseinline', 'escapenoentities' ) );
@@ -1231,8 +1232,7 @@
12321233 );
12331234 $uploadfooter = wfMsgNoTrans( 'uploadfooter' );
12341235 if( $uploadfooter != '-' && !wfEmptyMsg( 'uploadfooter', $uploadfooter ) ){
1235 - $wgOut->addWikiText( Xml::tags( 'div',
1236 - array( 'id' => 'mw-upload-footer-message' ), $uploadfooter ) );
 1236+ $wgOut->addWikiText( '<div id="mw-upload-footer-message">' . $uploadfooter . '</div>' );
12371237 }
12381238 }
12391239

Status & tagging log