X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fmedia%2FImageHandler.php;h=8e46f2f2fa3685ce6ec96e885ac550efc365222c;hb=d98e367d458188241cc79bdbe588344694e3c3d3;hp=ad9919b85e3a0d8747918ad611603b4fe9589f83;hpb=3e65b390b91a987affa7faf603a4eee614f5f4d5;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/media/ImageHandler.php b/includes/media/ImageHandler.php index ad9919b85e..8e46f2f2fa 100644 --- a/includes/media/ImageHandler.php +++ b/includes/media/ImageHandler.php @@ -58,7 +58,7 @@ abstract class ImageHandler extends MediaHandler { } elseif ( isset( $params['width'] ) ) { $width = $params['width']; } else { - throw new MWException( 'No width specified to '.__METHOD__ ); + throw new MWException( 'No width specified to ' . __METHOD__ ); } # Removed for ProofreadPage #$width = intval( $width ); @@ -92,7 +92,7 @@ abstract class ImageHandler extends MediaHandler { if ( !isset( $params['page'] ) ) { $params['page'] = 1; - } else { + } else { if ( $params['page'] > $image->pageCount() ) { $params['page'] = $image->pageCount(); } @@ -160,7 +160,7 @@ abstract class ImageHandler extends MediaHandler { $width = intval( $width ); # Sanity check $width - if( $width <= 0 ) { + if ( $width <= 0 ) { wfDebug( __METHOD__ . ": Invalid destination width: $width\n" ); return false; } @@ -187,9 +187,9 @@ abstract class ImageHandler extends MediaHandler { if ( !$this->normaliseParams( $image, $params ) ) { return false; } - $url = $script . '&' . wfArrayToCgi( $this->getScriptParams( $params ) ); + $url = wfAppendQuery( $script, $this->getScriptParams( $params ) ); - if( $image->mustRender() || $params['width'] < $image->getWidth() ) { + if ( $image->mustRender() || $params['width'] < $image->getWidth() ) { return new ThumbnailImage( $image, $url, false, $params ); } }