From 4618bb3e690fb7939221228280f9fd84802b618a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Fri, 8 Aug 2008 21:31:38 +0000 Subject: [PATCH] * Format numbers passed to messages * Some whitespace changes --- includes/ImagePage.php | 46 +++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/includes/ImagePage.php b/includes/ImagePage.php index ad7adbe928..e37070081c 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -118,8 +118,8 @@ class ImagePage extends Article { $this->imageHistory(); // TODO: Cleanup the following - $wgOut->addHTML( Xml::element( 'h2', - array( 'id' => 'filelinks' ), + $wgOut->addHTML( Xml::element( 'h2', + array( 'id' => 'filelinks' ), wfMsg( 'imagelinks' ) ) . "\n" ); $this->imageDupes(); // TODO: We may want to find local images redirecting to a foreign @@ -339,8 +339,10 @@ class ImagePage extends Article { # because of rounding. } $msgbig = wfMsgHtml( 'show-big-image' ); - $msgsmall = wfMsgExt( 'show-big-image-thumb', - array( 'parseinline' ), $wgLang->formatNum( $width ), $wgLang->formatNum( $height ) ); + $msgsmall = wfMsgExt( 'show-big-image-thumb', 'parseinline', + $wgLang->formatNum( $width ), + $wgLang->formatNum( $height ) + ); } else { # Image is small enough to show full size on image page $msgbig = htmlspecialchars( $this->displayImg->getName() ); @@ -614,7 +616,7 @@ EOT } else { $s=''; } $wgOut->addHTML( $s ); - $this->img->resetHistory(); // free db resources + $this->img->resetHistory(); // free db resources # Exist check because we don't want to show this on pages where an image # doesn't exist along with the noimage message, that would suck. -ævar @@ -624,9 +626,8 @@ EOT } - function imageLinks() - { - global $wgUser, $wgOut; + function imageLinks() { + global $wgUser, $wgOut, $wgLang; $limit = 100; @@ -652,7 +653,10 @@ EOT $wgOut->addWikiMsg( 'linkstoimage', $count ); } else { // More links than the limit. Add a link to [[Special:Whatlinkshere]] - $wgOut->addWikiMsg( 'linkstoimage-more', $limit, $this->mTitle->getPrefixedDBkey() ); + $wgOut->addWikiMsg( 'linkstoimage-more', + $wgLang->formatNum( $limit ), + $this->mTitle->getPrefixedDBkey() + ); } $wgOut->addHTML( "