* @ingroup Media
*/
use MediaWiki\MediaWikiServices;
+use MediaWiki\Shell\Shell;
/**
* Handler for images that need to be transformed
* 'physicalWidth' and 'physicalHeight' indicate the thumbnail dimensions.
* @return bool
*/
- function normaliseParams( $image, &$params ) {
+ public function normaliseParams( $image, &$params ) {
if ( !parent::normaliseParams( $image, $params ) ) {
return false;
}
}
// $scaler will return a MediaTransformError on failure, or false on success.
- // If the scaler is succesful, it will have created a thumbnail at the destination
+ // If the scaler is successful, it will have created a thumbnail at the destination
// path.
if ( is_array( $scaler ) && is_callable( $scaler ) ) {
// Allow subclasses to specify their own rendering methods.
function () use ( $method ) {
global $wgImageMagickConvertCommand;
- $cmd = wfEscapeShellArg( $wgImageMagickConvertCommand ) . ' -version';
+ $cmd = Shell::escape( $wgImageMagickConvertCommand ) . ' -version';
wfDebug( $method . ": Running convert -version\n" );
$retval = '';
$return = wfShellExecWithStderr( $cmd, $retval );