Index: trunk/extensions/PdfHandler/PdfHandler_body.php |
— | — | @@ -103,22 +103,22 @@ |
104 | 104 | |
105 | 105 | $width = $params['width']; |
106 | 106 | $height = $params['height']; |
107 | | - $srcPath = $image->getPath(); |
108 | 107 | $page = $params['page']; |
109 | 108 | |
110 | 109 | if ( $page > $this->pageCount( $image ) ) { |
111 | | - return $this->doTHumbError( $width, $height, 'pdf_page_error' ); |
| 110 | + return $this->doThumbError( $width, $height, 'pdf_page_error' ); |
112 | 111 | } |
113 | 112 | |
114 | 113 | 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 ); |
117 | 115 | } |
118 | 116 | |
119 | 117 | if ( !wfMkdirParents( dirname( $dstPath ), null, __METHOD__ ) ) { |
120 | 118 | return $this->doThumbError( $width, $height, 'thumbnail_dest_directory' ); |
121 | 119 | } |
122 | 120 | |
| 121 | + $srcPath = $image->getLocalRefPath(); |
| 122 | + |
123 | 123 | $cmd = '(' . wfEscapeShellArg( $wgPdfProcessor ); |
124 | 124 | $cmd .= " -sDEVICE=jpeg -sOutputFile=- -dFirstPage={$page} -dLastPage={$page}"; |
125 | 125 | $cmd .= " -r{$wgPdfHandlerDpi} -dBATCH -dNOPAUSE -q ". wfEscapeShellArg( $srcPath ); |