add photomap app

This commit is contained in:
zotlabs 2019-06-30 20:11:08 -07:00
parent 18dc941526
commit 6b1f5503a3
4 changed files with 11 additions and 3 deletions

View file

@ -340,6 +340,7 @@ class Apps {
'Channel Home' => t('Channel Home'),
'View Profile' => t('View Profile'),
'Photos' => t('Photos'),
'Photomap' => t('Photomap'),
'Events' => t('Events'),
'Tasks' => t('Tasks'),
'No Comment' => t('No Comment'),

View file

@ -2,6 +2,7 @@
namespace Zotlabs\Module;
use App;
use Zotlabs\Lib\Apps;
use Zotlabs\Lib\Libsync;
use Zotlabs\Lib\Libprofile;
use Zotlabs\Lib\PermissionDescription;
@ -1018,7 +1019,7 @@ class Photos extends Controller {
);
}
if($link_item['coord']) {
if($link_item['coord'] && Apps::system_app_installed($owner_uid,'Photomap')) {
$map = generate_map($link_item['coord']);
}
}

6
app/photomap.apd Normal file
View file

@ -0,0 +1,6 @@
version: 1
url: $baseurl/photomap
requires: local_channel
name: Photomap
photo: icon:file-image-o
categories: Networking

View file

@ -4,7 +4,7 @@
* @brief Functions related to photo handling.
*/
use Zotlabs\Lib\Apps;
use Zotlabs\Access\AccessControl;
require_once('include/permissions.php');
@ -356,7 +356,7 @@ function photo_upload($channel, $observer, $args) {
$lat = $lon = null;
if($exif && feature_enabled($channel_id,'photo_location')) {
if($exif && Apps::system_app_installed($channel_id,'Photomap')) {
$gps = null;
if(array_key_exists('GPS',$exif)) {
$gps = $exif['GPS'];