From 08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Mon, 12 Aug 2013 09:28:15 +0200 Subject: Update to MediaWiki 1.21.1 --- includes/media/PNG.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'includes/media/PNG.php') diff --git a/includes/media/PNG.php b/includes/media/PNG.php index 1b329e57..b8a5b40b 100644 --- a/includes/media/PNG.php +++ b/includes/media/PNG.php @@ -44,7 +44,7 @@ class PNGHandler extends BitmapHandler { return self::BROKEN_FILE; } - return serialize($metadata); + return serialize( $metadata ); } /** @@ -74,8 +74,8 @@ class PNGHandler extends BitmapHandler { */ function isAnimatedImage( $image ) { $ser = $image->getMetadata(); - if ($ser) { - $metadata = unserialize($ser); + if ( $ser ) { + $metadata = unserialize( $ser ); if( $metadata['frameCount'] > 1 ) return true; } return false; @@ -88,11 +88,11 @@ class PNGHandler extends BitmapHandler { function canAnimateThumbnail( $image ) { return false; } - + function getMetadataType( $image ) { return 'parsed-png'; } - + function isMetadataValid( $image, $metadata ) { if ( $metadata === self::BROKEN_FILE ) { @@ -105,13 +105,13 @@ class PNGHandler extends BitmapHandler { wfRestoreWarnings(); if ( !$data || !is_array( $data ) ) { - wfDebug(__METHOD__ . ' invalid png metadata' ); + wfDebug( __METHOD__ . ' invalid png metadata' ); return self::METADATA_BAD; } if ( !isset( $data['metadata']['_MW_PNG_VERSION'] ) || $data['metadata']['_MW_PNG_VERSION'] != PNGMetadataExtractor::VERSION ) { - wfDebug(__METHOD__ . ' old but compatible png metadata' ); + wfDebug( __METHOD__ . ' old but compatible png metadata' ); return self::METADATA_COMPATIBLE; } return self::METADATA_GOOD; @@ -126,7 +126,7 @@ class PNGHandler extends BitmapHandler { $original = parent::getLongDesc( $image ); wfSuppressWarnings(); - $metadata = unserialize($image->getMetadata()); + $metadata = unserialize( $image->getMetadata() ); wfRestoreWarnings(); if( !$metadata || $metadata['frameCount'] <= 0 ) @@ -134,21 +134,21 @@ class PNGHandler extends BitmapHandler { $info = array(); $info[] = $original; - + if ( $metadata['loopCount'] == 0 ) { $info[] = wfMessage( 'file-info-png-looped' )->parse(); } elseif ( $metadata['loopCount'] > 1 ) { $info[] = wfMessage( 'file-info-png-repeat' )->numParams( $metadata['loopCount'] )->parse(); } - + if ( $metadata['frameCount'] > 0 ) { $info[] = wfMessage( 'file-info-png-frames' )->numParams( $metadata['frameCount'] )->parse(); } - + if ( $metadata['duration'] ) { $info[] = $wgLang->formatTimePeriod( $metadata['duration'] ); } - + return $wgLang->commaList( $info ); } -- cgit v1.2.2