diff options
Diffstat (limited to 'include/photo/photo_driver.php')
-rw-r--r-- | include/photo/photo_driver.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php index 426eb6aac..2a7d1ae01 100644 --- a/include/photo/photo_driver.php +++ b/include/photo/photo_driver.php @@ -238,10 +238,12 @@ abstract class photo_driver { if(! $this->is_valid()) return FALSE; + if((! function_exists('exif_read_data')) || ($this->getType() !== 'image/jpeg')) return; $exif = @exif_read_data($filename,null,true); + if($exif) { $ort = $exif['IFD0']['Orientation']; @@ -281,7 +283,6 @@ abstract class photo_driver { break; } - // logger('exif: ' . print_r($exif,true)); return $exif; } @@ -556,14 +557,14 @@ function guess_image_type($filename, $headers = '') { } -function import_profile_photo($photo,$xchan,$thing = false) { +function import_xchan_photo($photo,$xchan,$thing = false) { $a = get_app(); $flags = (($thing) ? PHOTO_THING : PHOTO_XCHAN); $album = (($thing) ? 'Things' : 'Contact Photos'); - logger('import_profile_photo: updating channel photo from ' . $photo . ' for ' . $xchan, LOGGER_DEBUG); + logger('import_xchan_photo: updating channel photo from ' . $photo . ' for ' . $xchan, LOGGER_DEBUG); if($thing) $hash = photo_new_resource(); @@ -649,7 +650,7 @@ function import_profile_photo($photo,$xchan,$thing = false) { $micro = $a->get_baseurl() . '/photo/' . $hash . '-6'; } else { - logger('import_profile_photo: invalid image from ' . $photo); + logger('import_xchan_photo: invalid image from ' . $photo); $photo_failure = true; } if($photo_failure) { |