diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2013-08-12 09:28:15 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2013-08-12 09:28:15 +0200 |
commit | 08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 (patch) | |
tree | 577a29fb579188d16003a209ce2a2e9c5b0aa2bd /includes/media/PNG.php | |
parent | cacc939b34e315b85e2d72997811eb6677996cc1 (diff) |
Update to MediaWiki 1.21.1
Diffstat (limited to 'includes/media/PNG.php')
-rw-r--r-- | includes/media/PNG.php | 24 |
1 files changed, 12 insertions, 12 deletions
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 ); } |