Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F7590
svgMaxSize.diff
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 21 2014, 11:29 PM
2014-11-21 23:29:00 (UTC+0)
Size
790 B
Referenced Files
None
Subscribers
None
svgMaxSize.diff
View Options
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
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
7119
Default Alt Text
svgMaxSize.diff (790 B)
Attached To
Mode
T30940: thumbs of SVG images where only height parameter is specified do not get scaled up beyond their "normal" width
Attached
Detach File
Event Timeline
Log In to Comment