@@ 139-144 (lines=6) @@ | ||
136 | } |
|
137 | # Don't make an image bigger than wgMaxSVGSize on the smaller side |
|
138 | if ( $params['physicalWidth'] <= $params['physicalHeight'] ) { |
|
139 | if ( $params['physicalWidth'] > $wgSVGMaxSize ) { |
|
140 | $srcWidth = $image->getWidth( $params['page'] ); |
|
141 | $srcHeight = $image->getHeight( $params['page'] ); |
|
142 | $params['physicalWidth'] = $wgSVGMaxSize; |
|
143 | $params['physicalHeight'] = File::scaleHeight( $srcWidth, $srcHeight, $wgSVGMaxSize ); |
|
144 | } |
|
145 | } else { |
|
146 | if ( $params['physicalHeight'] > $wgSVGMaxSize ) { |
|
147 | $srcWidth = $image->getWidth( $params['page'] ); |
|
@@ 145-152 (lines=8) @@ | ||
142 | $params['physicalWidth'] = $wgSVGMaxSize; |
|
143 | $params['physicalHeight'] = File::scaleHeight( $srcWidth, $srcHeight, $wgSVGMaxSize ); |
|
144 | } |
|
145 | } else { |
|
146 | if ( $params['physicalHeight'] > $wgSVGMaxSize ) { |
|
147 | $srcWidth = $image->getWidth( $params['page'] ); |
|
148 | $srcHeight = $image->getHeight( $params['page'] ); |
|
149 | $params['physicalWidth'] = File::scaleHeight( $srcHeight, $srcWidth, $wgSVGMaxSize ); |
|
150 | $params['physicalHeight'] = $wgSVGMaxSize; |
|
151 | } |
|
152 | } |
|
153 | ||
154 | return true; |
|
155 | } |