r38948 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r38947‎ | r38948 | r38949 >
Date:20:55, 8 August 2008
Author:brion
Status:old
Tags:
Comment:
Cleanup to r38799 ("Add a more descriptive message to the links-to-image section for the case that more than 100 pages link to a file.")
Lift out a little duplicated code for good style
Modified paths:
  • /trunk/phase3/includes/ImagePage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ImagePage.php
@@ -645,17 +645,17 @@
646646 $wgOut->addWikiMsg( 'nolinkstoimage' );
647647 $wgOut->addHTML( "</div>\n" );
648648 return;
649 - } elseif ( $count <= $limit - 1 ) {
650 - $wgOut->addHTML( "<div id='mw-imagepage-section-linkstoimage'>\n" );
 649+ }
 650+
 651+ $wgOut->addHTML( "<div id='mw-imagepage-section-linkstoimage'>\n" );
 652+ if ( $count <= $limit - 1 ) {
651653 $wgOut->addWikiMsg( 'linkstoimage', $count );
652 - $wgOut->addHTML( "<ul class='mw-imagepage-linktoimage'>\n" );
653654 } else {
654655 // More links than the limit. Add a link to [[Special:Whatlinkshere]]
655 - $wgOut->addHTML( "<div id='mw-imagepage-section-linkstoimage'>\n" );
656656 $wgOut->addWikiMsg( 'linkstoimage-more', $limit, $this->mTitle->getPrefixedDBkey() );
657 - $wgOut->addHTML( "<ul class='mw-imagepage-linktoimage'>\n" );
658657 }
659658
 659+ $wgOut->addHTML( "<ul class='mw-imagepage-linktoimage'>\n" );
660660 $sk = $wgUser->getSkin();
661661 $count = 0;
662662 while ( $s = $res->fetchObject() ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r38799Add a more descriptive message to the links-to-image section for the case tha...raymond18:46, 7 August 2008

Status & tagging log