} 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 );
if ( !isset( $params['page'] ) ) {
$params['page'] = 1;
- } else {
+ } else {
if ( $params['page'] > $image->pageCount() ) {
$params['page'] = $image->pageCount();
}
$width = intval( $width );
# Sanity check $width
- if( $width <= 0) {
+ if ( $width <= 0 ) {
wfDebug( __METHOD__ . ": Invalid destination width: $width\n" );
return false;
}
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 );
}
}