diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2013-01-18 16:46:04 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2013-01-18 16:46:04 +0100 |
commit | 63601400e476c6cf43d985f3e7b9864681695ed4 (patch) | |
tree | f7846203a952e38aaf66989d0a4702779f549962 /includes/media/Exif.php | |
parent | 8ff01378c9e0207f9169b81966a51def645b6a51 (diff) |
Update to MediaWiki 1.20.2
this update includes:
* adjusted Arch Linux skin
* updated FluxBBAuthPlugin
* patch for https://bugzilla.wikimedia.org/show_bug.cgi?id=44024
Diffstat (limited to 'includes/media/Exif.php')
-rw-r--r-- | includes/media/Exif.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/includes/media/Exif.php b/includes/media/Exif.php index a4acdfe0..784a6018 100644 --- a/includes/media/Exif.php +++ b/includes/media/Exif.php @@ -1,5 +1,7 @@ <?php /** + * Extraction and validation of image metadata. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -368,6 +370,12 @@ class Exif { $this->exifGPStoNumber( 'GPSDestLongitude' ); if ( isset( $this->mFilteredExifData['GPSAltitude'] ) && isset( $this->mFilteredExifData['GPSAltitudeRef'] ) ) { + + // We know altitude data is a <num>/<denom> from the validation functions ran earlier. + // But multiplying such a string by -1 doesn't work well, so convert. + list( $num, $denom ) = explode( '/', $this->mFilteredExifData['GPSAltitude'] ); + $this->mFilteredExifData['GPSAltitude'] = $num / $denom; + if ( $this->mFilteredExifData['GPSAltitudeRef'] === "\1" ) { $this->mFilteredExifData['GPSAltitude'] *= - 1; } @@ -549,6 +557,7 @@ class Exif { */ /** * Get $this->mRawExifData + * @return array */ function getData() { return $this->mRawExifData; |