r59727 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59726‎ | r59727 | r59728 >
Date:11:33, 4 December 2009
Author:ialex
Status:ok
Tags:
Comment:
* (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 (modified) (history)
  • /trunk/phase3/includes/ImagePage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ImagePage.php
@@ -329,7 +329,7 @@
330330 $linkAttribs = array( 'href' => $full_url );
331331 $longDesc = $this->displayImg->getLongDesc();
332332
333 - wfRunHooks( 'ImageOpenShowImageInlineBefore', array( &$this , &$wgOut ) ) ;
 333+ wfRunHooks( 'ImageOpenShowImageInlineBefore', array( &$this, &$wgOut ) );
334334
335335 if( $this->displayImg->allowInlineDisplay() ) {
336336 # image
@@ -374,7 +374,8 @@
375375 '<br />' . Xml::tags( 'a', $linkAttribs, $msgbig ) . "$dirmark " . $longDesc;
376376 }
377377
378 - if( $this->displayImg->isMultipage() ) {
 378+ $isMulti = $this->displayImg->isMultipage() && $this->displayImg->pageCount() > 1;
 379+ if( $isMulti ) {
379380 $wgOut->addHTML( '<table class="multipageimage"><tr><td>' );
380381 }
381382
@@ -388,7 +389,7 @@
389390 $anchorclose . "</div>\n" );
390391 }
391392
392 - if( $this->displayImg->isMultipage() ) {
 393+ if( $isMulti ) {
393394 $count = $this->displayImg->pageCount();
394395
395396 if( $page > 1 ) {
Index: trunk/phase3/RELEASE-NOTES
@@ -663,6 +663,8 @@
664664 * (bug 20159) thumbnails rerendered if older that $wgThumbnailEpoch
665665 * Fixed a bug which in some situations causes the job queue to grow forever,
666666 due to an infinite loop of job requeues.
 667+* (bug 21523) File that can have multiple pages (djvu, pdf, ...) no longer have
 668+ the page selector when they have only one page
667669
668670 == API changes in 1.16 ==
669671

Follow-up revisions

RevisionCommit summaryAuthorDate
r59810Clarified documentation of File::isMultipage() to avoid further mistakes like...tstarling00:07, 8 December 2009

Status & tagging log