From 7841cad8f23a4546eca616aef4b935870c766425 Mon Sep 17 00:00:00 2001 From: Quentin Ligier Date: Sun, 17 Apr 2016 22:23:05 +0200 Subject: [PATCH] Small corrections IPTC data are in the first element of array. GPS coordinate helper added to required files. --- php/Modules/Photo.php | 8 ++++---- php/index.php | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/php/Modules/Photo.php b/php/Modules/Photo.php index dbe8204..a7c5d0f 100755 --- a/php/Modules/Photo.php +++ b/php/Modules/Photo.php @@ -771,10 +771,10 @@ final class Photo { // Position $fields = array(); - if (!empty($iptcInfo['2#090'])) $fields[] = trim($iptcInfo['2#090']); - if (!empty($iptcInfo['2#092'])) $fields[] = trim($iptcInfo['2#092']); - if (!empty($iptcInfo['2#095'])) $fields[] = trim($iptcInfo['2#095']); - if (!empty($iptcInfo['2#101'])) $fields[] = trim($iptcInfo['2#101']); + if (!empty($iptcInfo['2#090'])) $fields[] = trim($iptcInfo['2#090'][0]); + if (!empty($iptcInfo['2#092'])) $fields[] = trim($iptcInfo['2#092'][0]); + if (!empty($iptcInfo['2#095'])) $fields[] = trim($iptcInfo['2#095'][0]); + if (!empty($iptcInfo['2#101'])) $fields[] = trim($iptcInfo['2#101'][0]); if (!empty($fields)) $return['position'] = implode(', ', $fields); diff --git a/php/index.php b/php/index.php index 4bacbd7..174c6ef 100755 --- a/php/index.php +++ b/php/index.php @@ -22,6 +22,7 @@ require(__DIR__ . '/autoload.php'); require(__DIR__ . '/helpers/fastImageCopyResampled.php'); require(__DIR__ . '/helpers/generateID.php'); require(__DIR__ . '/helpers/getExtension.php'); +require(__DIR__ . '/helpers/getGPSCoordinate.php'); require(__DIR__ . '/helpers/getGraphHeader.php'); require(__DIR__ . '/helpers/getHashedString.php'); require(__DIR__ . '/helpers/hasPermissions.php');