* (bug 21523) File that can have multiple pages (djvu, pdf, ...) no longer have the...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Fri, 4 Dec 2009 11:33:50 +0000 (11:33 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Fri, 4 Dec 2009 11:33:50 +0000 (11:33 +0000)
RELEASE-NOTES
includes/ImagePage.php

index 9fd3ce7..7530fc7 100644 (file)
@@ -663,6 +663,8 @@ Hopefully we will remove this configuration var soon)
 * (bug 20159) thumbnails rerendered if older that $wgThumbnailEpoch
 * Fixed a bug which in some situations causes the job queue to grow forever, 
   due to an infinite loop of job requeues.
+* (bug 21523) File that can have multiple pages (djvu, pdf, ...) no longer have
+  the page selector when they have only one page
 
 == API changes in 1.16 ==
 
index d85ffdb..700bb76 100644 (file)
@@ -329,7 +329,7 @@ class ImagePage extends Article {
                        $linkAttribs = array( 'href' => $full_url );
                        $longDesc = $this->displayImg->getLongDesc();
 
-                       wfRunHooks( 'ImageOpenShowImageInlineBefore', array( &$this , &$wgOut ) )       ;
+                       wfRunHooks( 'ImageOpenShowImageInlineBefore', array( &$this, &$wgOut ) );
 
                        if( $this->displayImg->allowInlineDisplay() ) {
                                # image
@@ -374,7 +374,8 @@ class ImagePage extends Article {
                                                '<br />' . Xml::tags( 'a', $linkAttribs,  $msgbig ) . "$dirmark " . $longDesc;
                                }
 
-                               if( $this->displayImg->isMultipage() ) {
+                               $isMulti = $this->displayImg->isMultipage() && $this->displayImg->pageCount() > 1;
+                               if( $isMulti ) {
                                        $wgOut->addHTML( '<table class="multipageimage"><tr><td>' );
                                }
 
@@ -388,7 +389,7 @@ class ImagePage extends Article {
                                                $anchorclose . "</div>\n" );
                                }
 
-                               if( $this->displayImg->isMultipage() ) {
+                               if( $isMulti ) {
                                        $count = $this->displayImg->pageCount();
 
                                        if( $page > 1 ) {