r79025 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79024‎ | r79025 | r79026 >
Date:20:40, 26 December 2010
Author:brion
Status:ok
Tags:
Comment:
Check $wgShowEXIF before using Exif class; it's forced to false in DefaultSettings if, say, the exif functions are not present in PHP. :)

Per tweak in r79024
Modified paths:
  • /trunk/extensions/PagedTiffHandler/PagedTiffHandler.image.php (modified) (history)

Diff [purge]

Index: trunk/extensions/PagedTiffHandler/PagedTiffHandler.image.php
@@ -88,6 +88,7 @@
8989 public function retrieveMetaData() {
9090 global $wgImageMagickIdentifyCommand, $wgTiffExivCommand, $wgTiffUseExiv;
9191 global $wgTiffUseTiffinfo, $wgTiffTiffinfoCommand;
 92+ global $wgShowEXIF;
9293
9394 if ( $this->_meta === null ) {
9495 wfProfileIn( 'PagedTiffImage::retrieveMetaData' );
@@ -164,7 +165,7 @@
165166 $data = $this->parseExiv2Output( $dump );
166167
167168 $this->_meta['exif'] = $data;
168 - } else {
 169+ } else if ( $wgShowEXIF ) {
169170 wfDebug( __METHOD__ . ": using internal Exif( {$this->mFilename} )\n" );
170171 $exif = new Exif( $this->mFilename );
171172 $data = $exif->getFilteredData();

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r79024Throw an exception instead of low-level PHP fatal error if something invokes ...brion20:39, 26 December 2010

Status & tagging log