Removed DjVu pageCount() check and let it surface in the shell command
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 1 May 2015 23:38:04 +0000 (16:38 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Fri, 1 May 2015 23:38:04 +0000 (16:38 -0700)
* This avoids loading the bloated metadata field

Bug: T96360
Change-Id: I2f1b59e81829d5752857816536688cd596b65edf

includes/media/DjVu.php

index 5f6b965..011fb2a 100644 (file)
@@ -143,14 +143,6 @@ class DjVuHandler extends ImageHandler {
                $width = $params['width'];
                $height = $params['height'];
                $page = $params['page'];
-               if ( $page > $this->pageCount( $image ) ) {
-                       return new MediaTransformError(
-                               'thumbnail_error',
-                               $width,
-                               $height,
-                               wfMessage( 'djvu_page_error' )->text()
-                       );
-               }
 
                if ( $flags & self::TRANSFORM_LATER ) {
                        $params = array(