aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-03-14 11:37:24 +0100
committerMario Vavti <mario@mariovavti.com>2018-03-14 11:37:24 +0100
commit461e86423a5378d35554115f2cf6fd244692f213 (patch)
tree95b70c696045d2d6d1907c9c123d9ec07f378e3e
parentf70413a031bac53563751c749419d64bc2b04d9b (diff)
parenta0cbed80f3e488ab3592094f88b4587c68738737 (diff)
downloadvolse-hubzilla-461e86423a5378d35554115f2cf6fd244692f213.tar.gz
volse-hubzilla-461e86423a5378d35554115f2cf6fd244692f213.tar.bz2
volse-hubzilla-461e86423a5378d35554115f2cf6fd244692f213.zip
Merge remote-tracking branch 'mike/master' into dev
-rw-r--r--Zotlabs/Module/Chanview.php2
-rw-r--r--include/photo/photo_driver.php4
-rw-r--r--include/photos.php15
3 files changed, 14 insertions, 7 deletions
diff --git a/Zotlabs/Module/Chanview.php b/Zotlabs/Module/Chanview.php
index 24ab9b022..779c7e646 100644
--- a/Zotlabs/Module/Chanview.php
+++ b/Zotlabs/Module/Chanview.php
@@ -19,7 +19,7 @@ class Chanview extends \Zotlabs\Web\Controller {
}
if($_REQUEST['address']) {
$r = q("select * from xchan where xchan_addr = '%s' limit 1",
- dbesc($_REQUEST['address'])
+ dbesc(punify($_REQUEST['address']))
);
}
elseif(local_channel() && intval($_REQUEST['cid'])) {
diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php
index 6af753195..00284a288 100644
--- a/include/photo/photo_driver.php
+++ b/include/photo/photo_driver.php
@@ -289,12 +289,12 @@ abstract class photo_driver {
return false;
}
- $ort = $exif['IFD0']['Orientation'];
+ $ort = ((array_key_exists('IFD0',$exif)) ? $exif['IFD0']['Orientation'] : $exif['Orientation']);
if(! $ort) {
return false;
}
-
+
switch($ort) {
case 1: // nothing
break;
diff --git a/include/photos.php b/include/photos.php
index b1391f284..321f7159c 100644
--- a/include/photos.php
+++ b/include/photos.php
@@ -333,10 +333,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']);
}
}