dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Force default search backend on search test"
[lhc/web/wiklou.git]
/
includes
/
media
/
PNG.php
diff --git
a/includes/media/PNG.php
b/includes/media/PNG.php
index
d2c17ef
..
d879c12
100644
(file)
--- a/
includes/media/PNG.php
+++ b/
includes/media/PNG.php
@@
-27,7
+27,6
@@
* @ingroup Media
*/
class PNGHandler extends BitmapHandler {
* @ingroup Media
*/
class PNGHandler extends BitmapHandler {
-
const BROKEN_FILE = '0';
/**
const BROKEN_FILE = '0';
/**
@@
-41,6
+40,7
@@
class PNGHandler extends BitmapHandler {
} catch ( Exception $e ) {
// Broken file?
wfDebug( __METHOD__ . ': ' . $e->getMessage() . "\n" );
} catch ( Exception $e ) {
// Broken file?
wfDebug( __METHOD__ . ': ' . $e->getMessage() . "\n" );
+
return self::BROKEN_FILE;
}
return self::BROKEN_FILE;
}
@@
-48,7
+48,7
@@
class PNGHandler extends BitmapHandler {
}
/**
}
/**
- * @param
$image Fil
e
+ * @param
File $imag
e
* @return array|bool
*/
function formatMetadata( $image ) {
* @return array|bool
*/
function formatMetadata( $image ) {
@@
-63,7
+63,7
@@
class PNGHandler extends BitmapHandler {
/**
* Get a file type independent array of metadata.
*
/**
* Get a file type independent array of metadata.
*
- * @param
$image Fil
e
+ * @param
File $imag
e
* @return array The metadata array
*/
public function getCommonMetaArray( File $image ) {
* @return array The metadata array
*/
public function getCommonMetaArray( File $image ) {
@@
-77,11
+77,12
@@
class PNGHandler extends BitmapHandler {
return array();
}
unset( $meta['metadata']['_MW_PNG_VERSION'] );
return array();
}
unset( $meta['metadata']['_MW_PNG_VERSION'] );
+
return $meta['metadata'];
}
/**
return $meta['metadata'];
}
/**
- * @param
$image Fil
e
+ * @param
File $imag
e
* @return bool
*/
function isAnimatedImage( $image ) {
* @return bool
*/
function isAnimatedImage( $image ) {
@@
-92,11
+93,13
@@
class PNGHandler extends BitmapHandler {
return true;
}
}
return true;
}
}
+
return false;
}
return false;
}
+
/**
* We do not support making APNG thumbnails, so always false
/**
* We do not support making APNG thumbnails, so always false
- * @param
$image Fil
e
+ * @param
File $imag
e
* @return bool false
*/
function canAnimateThumbnail( $image ) {
* @return bool false
*/
function canAnimateThumbnail( $image ) {
@@
-120,19
+123,23
@@
class PNGHandler extends BitmapHandler {
if ( !$data || !is_array( $data ) ) {
wfDebug( __METHOD__ . " invalid png metadata\n" );
if ( !$data || !is_array( $data ) ) {
wfDebug( __METHOD__ . " invalid png metadata\n" );
+
return self::METADATA_BAD;
}
if ( !isset( $data['metadata']['_MW_PNG_VERSION'] )
return self::METADATA_BAD;
}
if ( !isset( $data['metadata']['_MW_PNG_VERSION'] )
- || $data['metadata']['_MW_PNG_VERSION'] != PNGMetadataExtractor::VERSION ) {
+ || $data['metadata']['_MW_PNG_VERSION'] != PNGMetadataExtractor::VERSION
+ ) {
wfDebug( __METHOD__ . " old but compatible png metadata\n" );
wfDebug( __METHOD__ . " old but compatible png metadata\n" );
+
return self::METADATA_COMPATIBLE;
}
return self::METADATA_COMPATIBLE;
}
+
return self::METADATA_GOOD;
}
/**
return self::METADATA_GOOD;
}
/**
- * @param
$image Fil
e
+ * @param
File $imag
e
* @return string
*/
function getLongDesc( $image ) {
* @return string
*/
function getLongDesc( $image ) {
@@
-167,4
+174,7
@@
class PNGHandler extends BitmapHandler {
return $wgLang->commaList( $info );
}
return $wgLang->commaList( $info );
}
+ public function supportsBucketing() {
+ return true;
+ }
}
}