(follow-up r86567) per CR rename the class JpegOrTiffHandler to ExifBitmapHandler.

This commit is contained in:
Brian Wolff 2011-06-17 03:37:59 +00:00
parent 3d3d027ce9
commit 35740d5b64
5 changed files with 11 additions and 9 deletions

View file

@ -95,7 +95,8 @@ production.
as lastTabIndex(). as lastTabIndex().
* (bug 29332) Warn if user requests mediawiki-announce subscription but does not * (bug 29332) Warn if user requests mediawiki-announce subscription but does not
enter an e-mail address. enter an e-mail address.
* (bug 25375) Add canonical namespaces to JavaScript "wgNamespaceIds" * (bug 25375) Add canonical namespaces to JavaScript "wgNamespaceIds"
* The class JpegOrTiffHandler was renamed ExifBitmapHandler.
=== API changes in 1.19 === === API changes in 1.19 ===
* BREAKING CHANGE: action=watch now requires POST and token. * BREAKING CHANGE: action=watch now requires POST and token.

View file

@ -528,7 +528,7 @@ $wgAutoloadLocalClasses = array(
'IPTC' => 'includes/media/IPTC.php', 'IPTC' => 'includes/media/IPTC.php',
'JpegHandler' => 'includes/media/Jpeg.php', 'JpegHandler' => 'includes/media/Jpeg.php',
'JpegMetadataExtractor' => 'includes/media/JpegMetadataExtractor.php', 'JpegMetadataExtractor' => 'includes/media/JpegMetadataExtractor.php',
'JpegOrTiffHandler' => 'includes/media/JpegOrTiff.php', 'ExifBitmapHandler' => 'includes/media/ExifBitmap.php',
'MediaHandler' => 'includes/media/Generic.php', 'MediaHandler' => 'includes/media/Generic.php',
'MediaTransformError' => 'includes/media/MediaTransformOutput.php', 'MediaTransformError' => 'includes/media/MediaTransformOutput.php',
'MediaTransformOutput' => 'includes/media/MediaTransformOutput.php', 'MediaTransformOutput' => 'includes/media/MediaTransformOutput.php',

View file

@ -10,7 +10,7 @@
* *
* @ingroup Media * @ingroup Media
*/ */
class JpegOrTiffHandler extends BitmapHandler { class ExifBitmapHandler extends BitmapHandler {
const BROKEN_FILE = '-1'; // error extracting metadata const BROKEN_FILE = '-1'; // error extracting metadata
const OLD_BROKEN_FILE = '0'; // outdated error extracting metadata. const OLD_BROKEN_FILE = '0'; // outdated error extracting metadata.

View file

@ -8,11 +8,12 @@
* JPEG specific handler. * JPEG specific handler.
* Inherits most stuff from BitmapHandler, just here to do the metadata handler differently. * Inherits most stuff from BitmapHandler, just here to do the metadata handler differently.
* *
* Metadata stuff common to Jpeg and built-in Tiff (not PagedTiffHandler) is in JpegOrTiffHandler. * Metadata stuff common to Jpeg and built-in Tiff (not PagedTiffHandler) is
* in ExifBitmapHandler.
* *
* @ingroup Media * @ingroup Media
*/ */
class JpegHandler extends JpegOrTiffHandler { class JpegHandler extends ExifBitmapHandler {
function getMetadata ( $image, $filename ) { function getMetadata ( $image, $filename ) {
try { try {
@ -28,7 +29,7 @@ class JpegHandler extends JpegOrTiffHandler {
// BitmapMetadataHandler throws an exception in certain exceptional cases like if file does not exist. // BitmapMetadataHandler throws an exception in certain exceptional cases like if file does not exist.
wfDebug( __METHOD__ . ': ' . $e->getMessage() . "\n" ); wfDebug( __METHOD__ . ': ' . $e->getMessage() . "\n" );
/* This used to use 0 (JpegOrTiffHandler::OLD_BROKEN_FILE) for the cases /* This used to use 0 (ExifBitmapHandler::OLD_BROKEN_FILE) for the cases
* * No metadata in the file * * No metadata in the file
* * Something is broken in the file. * * Something is broken in the file.
* However, if the metadata support gets expanded then you can't tell if the 0 is from * However, if the metadata support gets expanded then you can't tell if the 0 is from
@ -37,7 +38,7 @@ class JpegHandler extends JpegOrTiffHandler {
* Thus switch to using -1 to denote only a broken file, and use an array with only * Thus switch to using -1 to denote only a broken file, and use an array with only
* MEDIAWIKI_EXIF_VERSION to denote no props. * MEDIAWIKI_EXIF_VERSION to denote no props.
*/ */
return JpegOrTiffHandler::BROKEN_FILE; return ExifBitmapHandler::BROKEN_FILE;
} }
} }

View file

@ -11,7 +11,7 @@
* *
* @ingroup Media * @ingroup Media
*/ */
class TiffHandler extends JpegOrTiffHandler { class TiffHandler extends ExifBitmapHandler {
/** /**
* Conversion to PNG for inline display can be disabled here... * Conversion to PNG for inline display can be disabled here...
@ -63,7 +63,7 @@ class TiffHandler extends JpegOrTiffHandler {
$data['MEDIAWIKI_EXIF_VERSION'] = Exif::version(); $data['MEDIAWIKI_EXIF_VERSION'] = Exif::version();
return serialize( $data ); return serialize( $data );
} else { } else {
return JpegOrTiffHandler::BROKEN_FILE; return ExifBitmapHandler::BROKEN_FILE;
} }
} else { } else {
return ''; return '';