From: Bartosz DziewoƄski Date: Thu, 5 Feb 2015 18:14:34 +0000 (+0100) Subject: Use 'rsvg-convert' binary rather than 'rsvg' everywhere X-Git-Tag: 1.31.0-rc.0~12501 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=844618a231b795cdd18eb6f4a772f8dd89cfb315;p=lhc%2Fweb%2Fwiklou.git Use 'rsvg-convert' binary rather than 'rsvg' everywhere Update $wgSVGConverters['rsvg'] to something closer to WMF production configuration (there is a more complicated setup involving two variants of rsvg for some reason). Documentation is scarce, but 'rsvg-convert' appears to be the "modern" way to call rsvg, with 'rsvg' being deprecated or not recommended. Bug: T76476 Change-Id: I5ed877f3a5a1f1e97ae881c1d03fc977276182b6 --- diff --git a/RELEASE-NOTES-1.25 b/RELEASE-NOTES-1.25 index 22e5ac3689..dfcd177bcb 100644 --- a/RELEASE-NOTES-1.25 +++ b/RELEASE-NOTES-1.25 @@ -36,6 +36,8 @@ production. * ProfilerStandard and ProfilerSimpleTrace were removed. Make sure that any StartProfiler.php config is updated to reflect this. Xhprof is available for zend/hhvm. Also, for hhvm, one can consider using its xenon profiler. +* Default value of $wgSVGConverters['rsvg'] now uses the 'rsvg-convert' binary + rather than 'rsvg'. === New features in 1.25 === * (T64861) Updated plural rules to CLDR 26. Includes incompatible changes diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index c19c13bfd3..db3c0e27c8 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -956,7 +956,7 @@ $wgSVGConverters = array( 'inkscape' => '$path/inkscape -z -w $width -f $input -e $output', 'batik' => 'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d ' . '$output $input', - 'rsvg' => '$path/rsvg -w $width -h $height $input $output', + 'rsvg' => '$path/rsvg-convert -w $width -h $height -o $output $input', 'imgserv' => '$path/imgserv-wrapper -i svg -o png -w$width $input $output', 'ImagickExt' => array( 'SvgHandler::rasterizeImagickExt' ), ); diff --git a/includes/resourceloader/ResourceLoaderImage.php b/includes/resourceloader/ResourceLoaderImage.php index 0e43f65c3f..6788c6f577 100644 --- a/includes/resourceloader/ResourceLoaderImage.php +++ b/includes/resourceloader/ResourceLoaderImage.php @@ -308,7 +308,7 @@ class ResourceLoaderImage { $svg = $this->massageSvgPathdata( $svg ); if ( $wgSVGConverter === 'rsvg' ) { - $command = 'rsvg-convert'; // Should be just 'rsvg'? T76476 + $command = 'rsvg-convert'; if ( $wgSVGConverterPath ) { $command = wfEscapeShellArg( "$wgSVGConverterPath/" ) . $command; } diff --git a/tests/phpunit/includes/parser/NewParserTest.php b/tests/phpunit/includes/parser/NewParserTest.php index 010ae660f2..713c32d5e7 100644 --- a/tests/phpunit/includes/parser/NewParserTest.php +++ b/tests/phpunit/includes/parser/NewParserTest.php @@ -124,7 +124,7 @@ class NewParserTest extends MediaWikiTestCase { $tmpGlobals['wgFileExtensions'][] = 'svg'; $tmpGlobals['wgSVGConverter'] = 'rsvg'; $tmpGlobals['wgSVGConverters']['rsvg'] = - '$path/rsvg-convert -w $width -h $height $input -o $output'; + '$path/rsvg-convert -w $width -h $height -o $output $input'; if ( $GLOBALS['wgStyleDirectory'] === false ) { $tmpGlobals['wgStyleDirectory'] = "$IP/skins";