Skip to content
Snippets Groups Projects
Commit 05737473 authored by webgeer's avatar webgeer
Browse files
parent 2e34cddd
No related branches found
No related tags found
No related merge requests found
...@@ -64,6 +64,8 @@ function gmap_location_menu($may_cache) { ...@@ -64,6 +64,8 @@ function gmap_location_menu($may_cache) {
function gmap_location_user_page() { function gmap_location_user_page() {
global $user; global $user;
$locationbyuser=array();
$output ='<p>'.variable_get('gmap_user_map_header', t('This map illustrates the extent of users of this website. Each marker indicates a user that has entered their locations.'))."</p>\n"; $output ='<p>'.variable_get('gmap_user_map_header', t('This map illustrates the extent of users of this website. Each marker indicates a user that has entered their locations.'))."</p>\n";
// Find default marker // Find default marker
...@@ -108,7 +110,7 @@ function gmap_location_user_page() { ...@@ -108,7 +110,7 @@ function gmap_location_user_page() {
$thismap['markers'][]=$newmarker; $thismap['markers'][]=$newmarker;
} }
if (user_access('user locations') && function_exists('buddylist_get_buddies')) { if (user_access('user locations') && function_exists('buddylist_get_buddies') && count($locationbyuser)>0) {
//create lines for buddies //create lines for buddies
if (!isset($thismap['shapes'])) { if (!isset($thismap['shapes'])) {
$thismap['shapes']=array(); $thismap['shapes']=array();
...@@ -596,7 +598,7 @@ function gmap_location_user($op, &$edit, &$user, $category = NULL) { ...@@ -596,7 +598,7 @@ function gmap_location_user($op, &$edit, &$user, $category = NULL) {
return; return;
case 'form': case 'form':
if($category == 'gmap_user') _gmap_location_map_form(&$form, $edit, 'user'); if($category == 'gmap_user') _gmap_location_map_form($form, $edit, 'user');
return $form; return $form;
} }
...@@ -637,7 +639,7 @@ function gmap_location_form_alter($form_id, &$form) { ...@@ -637,7 +639,7 @@ function gmap_location_form_alter($form_id, &$form) {
case $type .'_node_form': case $type .'_node_form':
if(variable_get('gmap_node_'. $type, 0)) { if(variable_get('gmap_node_'. $type, 0)) {
$edit = array(); $edit = array();
_gmap_location_map_form(&$form, $edit, 'node'); _gmap_location_map_form($form, $edit, 'node');
} }
break; break;
} }
...@@ -735,6 +737,8 @@ function _gmap_location_map_form(&$form, &$edit, $type) { ...@@ -735,6 +737,8 @@ function _gmap_location_map_form(&$form, &$edit, $type) {
'#size'=>30, '#size'=>30,
'#maxlength'=>120, '#maxlength'=>120,
'#id'=>'gmap-address', '#id'=>'gmap-address',
'#description'=>t('The address to be found on the map. Enter an address and then hit "TAB" and the current location will be updated. Please note that this address is not saved for the node, it is only used for finding a location.'),
); );
$fields['address']='gmap_location_address'; $fields['address']='gmap_location_address';
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment