(bug 5071) Image appears above text when viewing diff of an image page
authorAaron Schulz <aaron@users.mediawiki.org>
Fri, 2 Jan 2009 19:11:34 +0000 (19:11 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Fri, 2 Jan 2009 19:11:34 +0000 (19:11 +0000)
* Hide image/toc on diff view. Previously, img cluttered the top of the diff and you had to scroll down. Also, we have thumbnails for the history (and current) anyway.

includes/ImagePage.php

index aa5295e..314d478 100644 (file)
@@ -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() ) {