Page MenuHomePhabricator

svgMaxSize.diff

Authored By
bzimport
Nov 21 2014, 11:29 PM
Size
790 B
Referenced Files
None
Subscribers
None

svgMaxSize.diff

Index: includes/Linker.php
===================================================================
--- includes/Linker.php (revision 87850)
+++ includes/Linker.php (working copy)
@@ -507,7 +507,14 @@
$fp['align'] = 'none';
}
if ( $file && !isset( $hp['width'] ) ) {
- $hp['width'] = $file->getWidth( $page );
+ if ( isset( $hp['height'] ) && $file->isVectorized() ) {
+ // If its a vector image, and user only specifies height
+ // we don't want it to be limited by its "normal" width.
+ global $wgSVGMaxSize;
+ $hp['width'] = $wgSVGMaxSize;
+ } else {
+ $hp['width'] = $file->getWidth( $page );
+ }
if ( isset( $fp['thumbnail'] ) || isset( $fp['framed'] ) || isset( $fp['frameless'] ) || !$hp['width'] ) {
global $wgThumbLimits, $wgThumbUpright;

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
7119
Default Alt Text
svgMaxSize.diff (790 B)

Event Timeline