r113939 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113938‎ | r113939 | r113940 >
Date:17:50, 15 March 2012
Author:aaron
Status:ok (Comments)
Tags:
Comment:
* r113886: use <div> instead of span to wrap element that has p tags.
* Also fixed an older instance of the same problem.
Modified paths:
  • /trunk/phase3/includes/FileDeleteForm.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUndelete.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/FileDeleteForm.php
@@ -89,9 +89,9 @@
9090
9191 if( !$status->isGood() ) {
9292 $wgOut->addHTML( '<h2>' . $this->prepareMessage( 'filedeleteerror-short' ) . "</h2>\n" );
93 - $wgOut->addHTML( '<span class="error">' );
 93+ $wgOut->addHTML( '<div class="error">' );
9494 $wgOut->addWikiText( $status->getWikiText( 'filedeleteerror-short', 'filedeleteerror-long' ) );
95 - $wgOut->addHTML( '</span>' );
 95+ $wgOut->addHTML( '</div>' );
9696 }
9797 if( $status->ok ) {
9898 $wgOut->setPageTitle( wfMessage( 'actioncomplete' ) );
Index: trunk/phase3/includes/specials/SpecialUndelete.php
@@ -1399,9 +1399,9 @@
14001400 // Show file deletion warnings and errors
14011401 $status = $archive->getFileStatus();
14021402 if( $status && !$status->isGood() ) {
1403 - $out->addHTML( '<span class="error">' );
 1403+ $out->addHTML( '<div class="error">' );
14041404 $out->addWikiText( $status->getWikiText( 'undelete-error-short', 'undelete-error-long' ) );
1405 - $out->addHTML( '</span>' );
 1405+ $out->addHTML( '</div>' );
14061406 }
14071407 }
14081408 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r114073Follow-up r113939: Add divs to addWikiText().siebrand21:19, 17 March 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r113886Add error css to errors like the other file operation pages and actionsaaron01:42, 15 March 2012

Comments

#Comment by Siebrand (talk | contribs)   20:49, 15 March 2012

I think there is something like wrapWikiMsg you can use to make these one liners.

#Comment by Aaron Schulz (talk | contribs)   23:34, 16 March 2012

Why is this fixme? It's only slight more verbose.

#Comment by Awjrichards (talk | contribs)   23:37, 16 March 2012

To flag it as a potential issue and solicit either switching to use MW magic for this or a reasoned response as to why it doesn't matter so we can move on rather than letting this languish with 'new' status.

#Comment by Awjrichards (talk | contribs)   18:06, 19 March 2012

Ha wow I probably normally would've OK'd this or just chatted with you about it in IRC but after code reviewing for like 6 hours straight, I think I started going a bit crazy.

#Comment by Aaron Schulz (talk | contribs)   23:54, 16 March 2012

I don't think wrapWikiMsg() works here, since we want the result of $status->getWikiText(). wrapWikiMsg() only accepts message keys or arrays with the key and params. What I'd need to pass in is wikitext instead.

#Comment by Siebrand (talk | contribs)   21:19, 17 March 2012

You're right.

Status & tagging log