http://www.mediawiki.org/wiki/Special:Code/MediaWiki/59727

Revision: 59727
Author:   ialex
Date:     2009-12-04 11:33:50 +0000 (Fri, 04 Dec 2009)

Log Message:
-----------
* (bug 21523) File that can have multiple pages (djvu, pdf, ...) no longer have 
the page selector when they have only one page

Modified Paths:
--------------
    trunk/phase3/RELEASE-NOTES
    trunk/phase3/includes/ImagePage.php

Modified: trunk/phase3/RELEASE-NOTES
===================================================================
--- trunk/phase3/RELEASE-NOTES  2009-12-04 11:20:32 UTC (rev 59726)
+++ trunk/phase3/RELEASE-NOTES  2009-12-04 11:33:50 UTC (rev 59727)
@@ -663,6 +663,8 @@
 * (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 ==
 

Modified: trunk/phase3/includes/ImagePage.php
===================================================================
--- trunk/phase3/includes/ImagePage.php 2009-12-04 11:20:32 UTC (rev 59726)
+++ trunk/phase3/includes/ImagePage.php 2009-12-04 11:33:50 UTC (rev 59727)
@@ -329,7 +329,7 @@
                        $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 @@
                                                '<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 @@
                                                $anchorclose . "</div>\n" );
                                }
 
-                               if( $this->displayImg->isMultipage() ) {
+                               if( $isMulti ) {
                                        $count = $this->displayImg->pageCount();
 
                                        if( $page > 1 ) {



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to