return true;
}
- function validateParam( $name, $value ) {
+ public function validateParam( $name, $value ) {
if ( $name === 'quality' ) {
return self::validateQuality( $value );
} else {
return $value === 'low';
}
- function makeParamString( $params ) {
+ public function makeParamString( $params ) {
// Prepend quality as "qValue-". This has to match parseParamString() below
$res = parent::makeParamString( $params );
if ( $res && isset( $params['quality'] ) ) {
return $res;
}
- function parseParamString( $str ) {
+ public function parseParamString( $str ) {
// $str contains "qlow-200px" or "200px" strings because thumb.php would strip the filename
// first - check if the string begins with "qlow-", and if so, treat it as quality.
// Pass the first portion, or the whole string if "qlow-" not found, to the parent
$rotation = ( $params['rotation'] + $this->getRotation( $file ) ) % 360;
- if ( $wgJpegTran && is_file( $wgJpegTran ) ) {
+ if ( $wgJpegTran && is_executable( $wgJpegTran ) ) {
$cmd = wfEscapeShellArg( $wgJpegTran ) .
" -rotate " . wfEscapeShellArg( $rotation ) .
" -outfile " . wfEscapeShellArg( $params['dstPath'] ) .