From d35d8dd82e31f82d75844b61a4c2036b9c6919b4 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Wed, 6 Jul 2011 14:45:19 +0000 Subject: [PATCH] Changed all dynamic calls to Linker methods into static ones in ImagePage.php. ImageHistoryList is not used in extension, so I also removed ImageHistoryList::getSkin(). --- includes/ImagePage.php | 61 ++++++++++++++++-------------------------- 1 file changed, 23 insertions(+), 38 deletions(-) diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 549dcd6234..6f7ad74c73 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -272,7 +272,6 @@ class ImagePage extends Article { $max = $wgImageLimits[$sizeSel]; $maxWidth = $max[0]; $maxHeight = $max[1]; - $sk = $wgUser->getSkin(); $dirmark = $wgLang->getDirMark(); if ( $this->displayImg->exists() ) { @@ -297,7 +296,7 @@ class ImagePage extends Article { # image # "Download high res version" link below the image - # $msgsize = wfMsgHtml( 'file-info-size', $width_orig, $height_orig, $sk->formatSize( $this->displayImg->getSize() ), $mime ); + # $msgsize = wfMsgHtml( 'file-info-size', $width_orig, $height_orig, Linker::formatSize( $this->displayImg->getSize() ), $mime ); # We'll show a thumbnail of this image if ( $width > $maxWidth || $height > $maxHeight ) { # Calculate the thumbnail size. @@ -358,14 +357,14 @@ class ImagePage extends Article { if ( $page > 1 ) { $label = $wgOut->parse( wfMsg( 'imgmultipageprev' ), false ); - $link = $sk->link( + $link = Linker::link( $this->getTitle(), $label, array(), array( 'page' => $page - 1 ), array( 'known', 'noclasses' ) ); - $thumb1 = $sk->makeThumbLinkObj( $this->getTitle(), $this->displayImg, $link, $label, 'none', + $thumb1 = Linker::makeThumbLinkObj( $this->getTitle(), $this->displayImg, $link, $label, 'none', array( 'page' => $page - 1 ) ); } else { $thumb1 = ''; @@ -373,14 +372,14 @@ class ImagePage extends Article { if ( $page < $count ) { $label = wfMsg( 'imgmultipagenext' ); - $link = $sk->link( + $link = Linker::link( $this->getTitle(), $label, array(), array( 'page' => $page + 1 ), array( 'known', 'noclasses' ) ); - $thumb2 = $sk->makeThumbLinkObj( $this->getTitle(), $this->displayImg, $link, $label, 'none', + $thumb2 = Linker::makeThumbLinkObj( $this->getTitle(), $this->displayImg, $link, $label, 'none', array( 'page' => $page + 1 ) ); } else { $thumb2 = ''; @@ -556,19 +555,17 @@ EOT return; } - $sk = $wgUser->getSkin(); - $wgOut->addHTML( "