Also set the queue types map when rebuilding the ready queue map
[lhc/web/wiklou.git] / thumb.php
index 3d49a43..d7bf453 100644 (file)
--- a/thumb.php
+++ b/thumb.php
@@ -116,6 +116,10 @@ function wfStreamThumb( array $params ) {
                $params['width'] = $params['w'];
                unset( $params['w'] );
        }
+       if ( isset( $params['width'] ) && substr( $params['width'], -2 ) == 'px' ) {
+               // strip the px (pixel) suffix, if found
+               $params['width'] = substr( $width, 0, strlen( $width ) - 2 );
+       }
        if ( isset( $params['p'] ) ) {
                $params['page'] = $params['p'];
        }
@@ -394,7 +398,7 @@ function wfGenerateThumbnail( File $file, array $params, $thumbName, $thumbPath
                                        // If the worker that finished made this thumbnail then use it.
                                        // Otherwise, it probably made a different thumbnail for this file.
                                        return $file->getRepo()->fileExists( $thumbPath )
-                                               ? $file->transform( $params )
+                                               ? $file->transform( $params, File::RENDER_NOW )
                                                : false; // retry once more in exclusive mode
                                },
                                'fallback' => function() {