Index: trunk/extensions/PagedTiffHandler/PagedTiffHandler_body.php |
— | — | @@ -1,9 +1,9 @@ |
2 | 2 | <?php |
3 | 3 | /** |
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 | + * |
8 | 8 | * This program is free software; you can redistribute it and/or modify |
9 | 9 | * it under the terms of the GNU General Public License as published by |
10 | 10 | * the Free Software Foundation; either version 2 of the License, or |
— | — | @@ -553,6 +553,9 @@ |
554 | 554 | */ |
555 | 555 | function getPageDimensions( $image, $page ) { |
556 | 556 | 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 | + } |
557 | 560 | $data = $this->getMetaArray( $image ); |
558 | 561 | return PagedTiffImage::getPageSize( $data, $page ); |
559 | 562 | } |