r63231 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63230‎ | r63231 | r63232 >
Date:23:32, 3 March 2010
Author:mglaser
Status:deferred
Tags:
Comment:
fixed bug where too high a page number in image links would produce a read link instead of an image.
Modified paths:
  • /trunk/extensions/PagedTiffHandler/PagedTiffHandler_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/PagedTiffHandler/PagedTiffHandler_body.php
@@ -1,9 +1,9 @@
22 <?php
33 /**
4 - * Copyright (C) Wikimedia Deuschland, 2009
5 - * Authors Hallo Welt! Medienwerkstatt GmbH
6 - * Authors Sebastian Ulbricht, Daniel Lynge, Marc Reymann, Markus Glaser
7 - *
 4+ * Copyright (C) Wikimedia Deuschland, 2009
 5+ * Authors Hallo Welt! Medienwerkstatt GmbH
 6+ * Authors Sebastian Ulbricht, Daniel Lynge, Marc Reymann, Markus Glaser
 7+ *
88 * This program is free software; you can redistribute it and/or modify
99 * it under the terms of the GNU General Public License as published by
1010 * the Free Software Foundation; either version 2 of the License, or
@@ -553,6 +553,9 @@
554554 */
555555 function getPageDimensions( $image, $page ) {
556556 if(!$page) { $page=1; } // makeImageLink2 (Linker.php) sets $page to false if no page parameter in wiki code is set
 557+ if ( $page > $this->pageCount( $image ) ) {
 558+ $page = $this->pageCount( $image );
 559+ }
557560 $data = $this->getMetaArray( $image );
558561 return PagedTiffImage::getPageSize( $data, $page );
559562 }

Status & tagging log