X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FImagePage.php;h=f95e536a9af79283bde93e4bc39dd82b3adac83a;hb=48fe5241a539e1d5afcc75a40a9d23f53d092ed4;hp=60d7b3b63eae70ed3ced08733d0d4f6a8d14f272;hpb=88d789e93998868e412d1b40fe003c1e4b0c2492;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 60d7b3b63e..f95e536a9a 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -84,6 +84,8 @@ class ImagePage extends Article { if( $this->mTitle->getNamespace() != NS_FILE || ( isset( $diff ) && $diffOnly ) ) return Article::view(); + + $this->showRedirectedFromHeader(); if( $wgShowEXIF && $this->displayImg->exists() ) { // FIXME: bad interface, see note on MediaHandler::formatMetadata(). @@ -441,7 +443,7 @@ class ImagePage extends Article { $icon= $this->displayImg->iconThumb(); $wgOut->addHTML( '\n" ); } @@ -451,9 +453,7 @@ class ImagePage extends Article { if($showLink) { $filename = wfEscapeWikiText( $this->displayImg->getName() ); - $medialink = $this->displayImg->isMissing() ? - "'''$filename'''" : - "[[Media:$filename|$filename]]"; + $medialink = "[[Media:$filename|$filename]]"; if( !$this->displayImg->isSafeFile() ) { $warning = wfMsgNoTrans( 'mediawarning' ); @@ -484,17 +484,17 @@ EOT if ( $wgEnableUploads && $wgUser->isAllowed( 'upload' ) ) { // Only show an upload link if the user can upload $uploadTitle = SpecialPage::getTitleFor( 'Upload' ); - $nofile = wfMsgHtml( + $nofile = array( 'filepage-nofile-link', $uploadTitle->getFullUrl( array( 'wpDestFile' => $this->img->getName() ) ) ); } else { - $nofile = wfMsgHtml( 'filepage-nofile' ); + $nofile = 'filepage-nofile'; } $wgOut->setRobotPolicy( 'noindex,nofollow' ); - $wgOut->addHTML( '' ); + $wgOut->wrapWikiMsg( "", $nofile ); } } @@ -553,7 +553,7 @@ EOT $wgOut->addHTML( "