You are here

function _location_ca_enough_fields_for_yahoo in Location 7.4

Same name and namespace in other branches
  1. 5.3 supported/location.ca.inc \_location_ca_enough_fields_for_yahoo()
  2. 5 supported/location.ca.inc \_location_ca_enough_fields_for_yahoo()
  3. 6.3 supported/location.ca.inc \_location_ca_enough_fields_for_yahoo()
  4. 7.5 supported/location.ca.inc \_location_ca_enough_fields_for_yahoo()
  5. 7.3 supported/location.ca.inc \_location_ca_enough_fields_for_yahoo()
1 call to _location_ca_enough_fields_for_yahoo()
_location_driving_directions_link_ca_yahoo in supported/location.ca.inc
Parameters: Function that is called by location_driving_directions_link_ca() under assumption that it is the chosen function

File

supported/location.ca.inc, line 259

Code

function _location_ca_enough_fields_for_yahoo($location) {

  // These are the fields that need to be in each location if we are to provide a direct
  // link to yahoo directions.  If all of these fields don't have values, then we generate
  // a link to the *form* for Yahoo! driving directions rather than directly to the driving
  // directions themselves.
  if (strlen($location['street']) && strlen($location['city']) && strlen($location['province'])) {
    return TRUE;
  }
  if (strlen($location['street']) && strlen($location['postal_code'])) {
    return TRUE;
  }
  if (strlen($location['street']) && strlen($location['city']) && strlen($location['province'])) {
    return TRUE;
  }
  return FALSE;
}