Switch some HTMLForms in special pages to OOUI
[lhc/web/wiklou.git] / includes / media / Jpeg.php
index fbdbdfe..040ff96 100644 (file)
@@ -106,7 +106,7 @@ class JpegHandler extends ExifBitmapHandler {
                        $meta['MEDIAWIKI_EXIF_VERSION'] = Exif::version();
 
                        return serialize( $meta );
-               } catch ( MWException $e ) {
+               } catch ( Exception $e ) {
                        // BitmapMetadataHandler throws an exception in certain exceptional
                        // cases like if file does not exist.
                        wfDebug( __METHOD__ . ': ' . $e->getMessage() . "\n" );
@@ -137,16 +137,14 @@ class JpegHandler extends ExifBitmapHandler {
 
                $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'] ) .
                                " " . wfEscapeShellArg( $params['srcPath'] );
                        wfDebug( __METHOD__ . ": running jpgtran: $cmd\n" );
-                       wfProfileIn( 'jpegtran' );
                        $retval = 0;
                        $err = wfShellExecWithStderr( $cmd, $retval );
-                       wfProfileOut( 'jpegtran' );
                        if ( $retval !== 0 ) {
                                $this->logErrorForExternalProcess( $retval, $err, $cmd );