You are here

function _gmap_cck_gpxdata_filefield in GMap Addons 7

Same name and namespace in other branches
  1. 5 gmap_cck.module \_gmap_cck_gpxdata_filefield()
  2. 6 gmap_cck.module \_gmap_cck_gpxdata_filefield()

try to always get filedata from filefield, even if we're in preview mode

1 call to _gmap_cck_gpxdata_filefield()
_gmap_cck_check_gpx_source in ./gmap_cck.module
End of "addtogroup hooks".

File

./gmap_cck.module, line 477
display of a google map as cck field

Code

function _gmap_cck_gpxdata_filefield(&$v, &$filefield) {
  foreach ($filefield as $i => $data) {
    if (!isset($data['filepath'])) {
      continue;
    }
    $v['gpx'] = array(
      'type' => 'file',
      'file' => $data['filepath'],
    );
    return true;
  }
  return false;
}