r110727 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110726‎ | r110727 | r110728 >
Date:20:29, 5 February 2012
Author:aaron
Status:ok
Tags:miscextensions 
Comment:
* Update doTransform() for FileBackend changes
* Fixed case type in function call
Modified paths:
  • /trunk/extensions/PdfHandler/PdfHandler_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/PdfHandler/PdfHandler_body.php
@@ -103,22 +103,22 @@
104104
105105 $width = $params['width'];
106106 $height = $params['height'];
107 - $srcPath = $image->getPath();
108107 $page = $params['page'];
109108
110109 if ( $page > $this->pageCount( $image ) ) {
111 - return $this->doTHumbError( $width, $height, 'pdf_page_error' );
 110+ return $this->doThumbError( $width, $height, 'pdf_page_error' );
112111 }
113112
114113 if ( $flags & self::TRANSFORM_LATER ) {
115 - return new ThumbnailImage( $image, $dstUrl, $width,
116 - $height, $dstPath, $page );
 114+ return new ThumbnailImage( $image, $dstUrl, $width, $height, false, $page );
117115 }
118116
119117 if ( !wfMkdirParents( dirname( $dstPath ), null, __METHOD__ ) ) {
120118 return $this->doThumbError( $width, $height, 'thumbnail_dest_directory' );
121119 }
122120
 121+ $srcPath = $image->getLocalRefPath();
 122+
123123 $cmd = '(' . wfEscapeShellArg( $wgPdfProcessor );
124124 $cmd .= " -sDEVICE=jpeg -sOutputFile=- -dFirstPage={$page} -dLastPage={$page}";
125125 $cmd .= " -r{$wgPdfHandlerDpi} -dBATCH -dNOPAUSE -q ". wfEscapeShellArg( $srcPath );

Status & tagging log