X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fpage%2FImageHistoryList.php;h=53133345ca70a9c90ab1dbd9ba137b4d4cffd01e;hb=ba88b2fbb0339664e43d8e8897ccd9df5fcb547d;hp=bb8ed2420b2e29990b0524b02930330545a5fadb;hpb=9964ca1a390c446397dcd466916ffed356cdc3c9;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/page/ImageHistoryList.php b/includes/page/ImageHistoryList.php index bb8ed2420b..53133345ca 100644 --- a/includes/page/ImageHistoryList.php +++ b/includes/page/ImageHistoryList.php @@ -18,6 +18,8 @@ * @file */ +use MediaWiki\MediaWikiServices; + /** * Builds the image revision log shown on image pages * @@ -52,13 +54,14 @@ class ImageHistoryList extends ContextSource { * @param ImagePage $imagePage */ public function __construct( $imagePage ) { - global $wgShowArchiveThumbnails; + $context = $imagePage->getContext(); $this->current = $imagePage->getPage()->getFile(); $this->img = $imagePage->getDisplayedFile(); $this->title = $imagePage->getTitle(); $this->imagePage = $imagePage; - $this->showThumb = $wgShowArchiveThumbnails && $this->img->canRender(); - $this->setContext( $imagePage->getContext() ); + $this->showThumb = $context->getConfig()->get( 'ShowArchiveThumbnails' ) && + $this->img->canRender(); + $this->setContext( $context ); } /** @@ -111,8 +114,6 @@ class ImageHistoryList extends ContextSource { * @return string */ public function imageHistoryLine( $iscur, $file ) { - global $wgContLang; - $user = $this->getUser(); $lang = $this->getLanguage(); $timestamp = wfTimestamp( TS_MW, $file->getTimestamp() ); @@ -264,8 +265,9 @@ class ImageHistoryList extends ContextSource { $row .= '' . $this->msg( 'rev-deleted-comment' )->escaped() . ''; } else { - $row .= '' . - Linker::formatComment( $description, $this->title ) . ''; + $row .= + '' . Linker::formatComment( $description, $this->title ) . ''; } $rowClass = null;