From: Alexandre Emsenhuber Date: Fri, 4 Dec 2009 11:33:50 +0000 (+0000) Subject: * (bug 21523) File that can have multiple pages (djvu, pdf, ...) no longer have the... X-Git-Tag: 1.31.0-rc.0~38633 X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_user_edit%27%2C%20iduser=user.userid%29%20%7D%7D?a=commitdiff_plain;h=b3f46dd82a7b455a743e81c0e770d84edbc54309;p=lhc%2Fweb%2Fwiklou.git * (bug 21523) File that can have multiple pages (djvu, pdf, ...) no longer have the page selector when they have only one page --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 9fd3ce74ec..7530fc74e2 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/ImagePage.php b/includes/ImagePage.php index d85ffdb6b8..700bb767ba 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -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 { '
' . Xml::tags( 'a', $linkAttribs, $msgbig ) . "$dirmark " . $longDesc; } - if( $this->displayImg->isMultipage() ) { + $isMulti = $this->displayImg->isMultipage() && $this->displayImg->pageCount() > 1; + if( $isMulti ) { $wgOut->addHTML( '
' ); } @@ -388,7 +389,7 @@ class ImagePage extends Article { $anchorclose . "\n" ); } - if( $this->displayImg->isMultipage() ) { + if( $isMulti ) { $count = $this->displayImg->pageCount(); if( $page > 1 ) {