X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FImagePage.php;h=d3e01f29ebc877ff84eaa21afca0fc6585f7cdeb;hb=4512a96741006924b8f9eada971726de7d0f49aa;hp=7fb33a5d883093f80949980fd99a9b0a1a6368f7;hpb=753cc671ca3fed0e76324d7f87a002195a1c34c4;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 7fb33a5d88..d3e01f29eb 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -93,10 +93,11 @@ class ImagePage extends Article { $showmeta = false; } - if( $this->displayImg->exists() ) + if( !$diff && $this->displayImg->exists() ) $wgOut->addHTML( $this->showTOC($showmeta) ); - $this->openShowImage(); + if( !$diff ) + $this->openShowImage(); # No need to display noarticletext, we use our own message, output in openShowImage() if( $this->getID() ) { @@ -104,7 +105,6 @@ class ImagePage extends Article { } else { # Just need to set the right headers $wgOut->setArticleFlag( true ); - $wgOut->setRobotPolicy( 'noindex,nofollow' ); $wgOut->setPageTitle( $this->mTitle->getPrefixedText() ); $this->viewUpdates(); } @@ -115,9 +115,7 @@ class ImagePage extends Article { if( $fol != '-' && !wfEmptyMsg( 'shareddescriptionfollows', $fol ) ) { $wgOut->addWikiText( $fol ); } - $wgOut->addHTML( '
' ); - } else { - $this->checkSharedConflict(); + $wgOut->addHTML( ' \n" ); } $this->closeShowImage(); @@ -128,18 +126,16 @@ class ImagePage extends Article { array( 'id' => 'filelinks' ), wfMsg( 'imagelinks' ) ) . "\n" ); $this->imageDupes(); - // TODO: We may want to find local images redirecting to a foreign - // file: "The following local files redirect to this file" - if( $this->img->isLocal() ) { - $this->imageRedirects(); - } + # TODO! FIXME! For some freaky reason, we can't redirect to foreign images. + # Yet we return metadata about the target. Definitely an issue in the FileRepo + $this->imageRedirects(); $this->imageLinks(); if( $showmeta ) { global $wgStylePath, $wgStyleVersion; $expand = htmlspecialchars( Xml::escapeJsString( wfMsg( 'metadata-expand' ) ) ); $collapse = htmlspecialchars( Xml::escapeJsString( wfMsg( 'metadata-collapse' ) ) ); - $wgOut->addHTML( Xml::element( 'h2', array( 'id' => 'metadata' ), wfMsg( 'metadata' ) ). "\n" ); + $wgOut->addHTML( Xml::element( 'h2', array( 'id' => 'metadata' ), wfMsg( 'metadata' ) ) . "\n" ); $wgOut->addWikiText( $this->makeMetadataTable( $formattedMetadata ) ); $wgOut->addScriptFile( 'metadata.js' ); $wgOut->addHTML( @@ -230,9 +226,9 @@ class ImagePage extends Article { $r = '