turn photo location mapping into a feature
This commit is contained in:
parent
7af012b1f9
commit
fab8209ebd
@ -44,6 +44,7 @@ function get_features() {
|
|||||||
array('webpages', t('Web Pages'), t('Provide managed web pages on your channel'),false),
|
array('webpages', t('Web Pages'), t('Provide managed web pages on your channel'),false),
|
||||||
array('private_notes', t('Private Notes'), t('Enables a tool to store notes and reminders'),false),
|
array('private_notes', t('Private Notes'), t('Enables a tool to store notes and reminders'),false),
|
||||||
array('nav_channel_select', t('Navigation Channel Select'), t('Change channels directly from within the navigation dropdown menu'),false),
|
array('nav_channel_select', t('Navigation Channel Select'), t('Change channels directly from within the navigation dropdown menu'),false),
|
||||||
|
array('photo_location', t('Photo Location'), t('Photo metadata is normally stripped. This extracts the location (if present) prior to stripping metadata and links it to a map.'),false),
|
||||||
|
|
||||||
|
|
||||||
//FIXME - needs a description, but how the hell do we explain this to normals?
|
//FIXME - needs a description, but how the hell do we explain this to normals?
|
||||||
|
@ -208,7 +208,7 @@ function photo_upload($channel, $observer, $args) {
|
|||||||
$lat = $lon = null;
|
$lat = $lon = null;
|
||||||
|
|
||||||
if($exif && $exif['GPS']) {
|
if($exif && $exif['GPS']) {
|
||||||
if(get_pconfig($channel_id,'system','allow_photo_location')) {
|
if(feature_enabled($channel_id,'photo_location')) {
|
||||||
$lat = getGps($exif['GPS']['GPSLatitude'], $exif['GPSLatitudeRef']);
|
$lat = getGps($exif['GPS']['GPSLatitude'], $exif['GPSLatitudeRef']);
|
||||||
$lon = getGps($exif['GPS']['GPSLongitude'], $exif['GPSLongitudeRef']);
|
$lon = getGps($exif['GPS']['GPSLongitude'], $exif['GPSLongitudeRef']);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user