From 1266ee5ab6f1b7f97d80b96a5c0bfa360bbb683d Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 11 Jun 2008 01:51:12 +0000 Subject: [PATCH] Reverting r36139 -- broke wikitext in linkstoimage AGAIN. --- includes/ImagePage.php | 28 ++++++++++++---------------- languages/messages/MessagesDe.php | 6 +++--- languages/messages/MessagesEn.php | 6 +++--- 3 files changed, 18 insertions(+), 22 deletions(-) diff --git a/includes/ImagePage.php b/includes/ImagePage.php index ec1610fc96..55e63baffe 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -630,7 +630,7 @@ EOT function imageLinks() { global $wgUser, $wgOut; - + $limit = 100; $dbr = wfGetDB( DB_SLAVE ); @@ -643,17 +643,15 @@ EOT array( 'LIMIT' => $limit + 1) ); - $count = $dbr->numRows( $res ); - if ( $count == 0 ) { + if ( 0 == $dbr->numRows( $res ) ) { $wgOut->addHTML( "
\n" ); $wgOut->addWikiMsg( 'nolinkstoimage' ); $wgOut->addHTML( "
\n" ); return; } - $wgOut->addHTML( "
\n" . - wfMsgExt( 'linkstoimage', array( 'parseinline', 'escape' ), min( $count, $limit ) ) . - "