r98016 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98015‎ | r98016 | r98017 >
Date:19:31, 24 September 2011
Author:mglaser
Status:ok
Tags:
Comment:
* fixes bug 31078: tiff format should always return true for isMultiPage
Modified paths:
  • /trunk/extensions/PagedTiffHandler/PagedTiffHandler_body.php (modified) (history)
  • /trunk/extensions/PagedTiffHandler/tests/PagedTiffHandlerTest.php (modified) (history)

Diff [purge]

Index: trunk/extensions/PagedTiffHandler/tests/PagedTiffHandlerTest.php
@@ -283,7 +283,7 @@
284284
285285 // isMultiPage
286286 $this->assertTrue( $this->handler->isMultiPage( $this->multipage_image ) );
287 - $this->assertFalse( $this->handler->isMultiPage( $this->mhz_image ) );
 287+ $this->assertTrue( $this->handler->isMultiPage( $this->mhz_image ) );
288288
289289 // formatMetadata
290290 $formattedMetadata = $this->handler->formatMetadata( $this->multipage_image );
Index: trunk/extensions/PagedTiffHandler/PagedTiffHandler_body.php
@@ -42,12 +42,11 @@
4343 return true;
4444 }
4545
 46+ /**
 47+ * Does the file format support multi-page documents?
 48+ */
4649 function isMultiPage( $img ) {
47 - if ( !$img ) {
48 - return true;
49 - }
50 - $meta = unserialize( $img->metadata );
51 - return $meta['page_count'] > 1;
 50+ return true;
5251 }
5352
5453 /**

Status & tagging log