aboutsummaryrefslogtreecommitdiffstats
path: root/include/photos.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-05-04 09:46:27 +0200
committerMario Vavti <mario@mariovavti.com>2018-05-04 09:46:27 +0200
commitbe4c9a9598350fb4333480f0c7b302acebcddfd4 (patch)
treefb0c2606ad4ca0bc1a710d6fdf82f55c326b3427 /include/photos.php
parentf15c12376adad6534c8c0ea547a7548697eb8379 (diff)
parentbe852ba857f4cb8e75574a762945b50c8bddcff9 (diff)
downloadvolse-hubzilla-3.4.tar.gz
volse-hubzilla-3.4.tar.bz2
volse-hubzilla-3.4.zip
Merge branch '3.4RC'3.4
Diffstat (limited to 'include/photos.php')
-rw-r--r--include/photos.php19
1 files changed, 15 insertions, 4 deletions
diff --git a/include/photos.php b/include/photos.php
index b1391f284..9ae0e6874 100644
--- a/include/photos.php
+++ b/include/photos.php
@@ -211,6 +211,10 @@ function photo_upload($channel, $observer, $args) {
$ph->orient($exif);
}
+
+ $ph->clearexif();
+
+
@unlink($src);
$max_length = get_config('system','max_image_length');
@@ -333,10 +337,17 @@ function photo_upload($channel, $observer, $args) {
$lat = $lon = null;
- if($exif && $exif['GPS']) {
- if(feature_enabled($channel_id,'photo_location')) {
- $lat = getGps($exif['GPS']['GPSLatitude'], $exif['GPS']['GPSLatitudeRef']);
- $lon = getGps($exif['GPS']['GPSLongitude'], $exif['GPS']['GPSLongitudeRef']);
+ if($exif && feature_enabled($channel_id,'photo_location')) {
+ $gps = null;
+ if(array_key_exists('GPS',$exif)) {
+ $gps = $exif['GPS'];
+ }
+ elseif(array_key_exists('GPSLatitude',$exif)) {
+ $gps = $exif;
+ }
+ if($gps) {
+ $lat = getGps($gps['GPSLatitude'], $gps['GPSLatitudeRef']);
+ $lon = getGps($gps['GPSLongitude'], $gps['GPSLongitudeRef']);
}
}