From ee6bf35cb4c5768cb1a63137377003a8330e669c Mon Sep 17 00:00:00 2001 From: Erik Moeller Date: Sat, 21 May 2005 15:59:30 +0000 Subject: [PATCH] don't choke if EXIF library is not available --- includes/Image.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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']; -- 2.20.1