From: Erik Moeller Date: Sat, 21 May 2005 15:59:30 +0000 (+0000) Subject: don't choke if EXIF library is not available X-Git-Tag: 1.5.0alpha2~135 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=ee6bf35cb4c5768cb1a63137377003a8330e669c;p=lhc%2Fweb%2Fwiklou.git don't choke if EXIF library is not available --- diff --git a/includes/Image.php b/includes/Image.php index 2b49627e04..6b53b5cf2e 100644 --- a/includes/Image.php +++ b/includes/Image.php @@ -188,7 +188,8 @@ class Image * Load metadata from the file itself */ function loadFromFile() { - global $wgUseSharedUploads, $wgSharedUploadDirectory, $wgLang; + global $wgUseSharedUploads, $wgSharedUploadDirectory, $wgLang, + $wgShowEXIF; $fname = 'Image::loadFromFile'; wfProfileIn( $fname ); $this->imagePath = $this->getFullPath(); @@ -267,7 +268,7 @@ class Image $this->dataLoaded = true; - if ($this->fileExists) $this->metadata = serialize ( $this->retrieveExifData() ) ; + if ($this->fileExists && $wgShowEXIF) $this->metadata = serialize ( $this->retrieveExifData() ) ; else $this->metadata = serialize ( array() ) ; if ( isset( $gis['bits'] ) ) $this->bits = $gis['bits'];