You are here

function getlocations_places_check in Get Locations 7

Same name and namespace in other branches
  1. 7.2 getlocations.module \getlocations_places_check()

Function to check wether the google places library should be enabled.

Return value

bool

1 call to getlocations_places_check()
getlocations_setup_js in ./getlocations.module
Function to setup the map scripts

File

./getlocations.module, line 1703
getlocations.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function getlocations_places_check() {
  $found = FALSE;
  if (module_exists('getlocations_fields')) {
    $getlocations_fields_defaults = getlocations_fields_defaults();
    if (isset($getlocations_fields_defaults['use_address']) && $getlocations_fields_defaults['use_address']) {
      $found = TRUE;
    }
  }
  $getlocations_defaults = getlocations_defaults();
  if ($getlocations_defaults['getdirections_enabled']) {
    $getdirections_defaults = getdirections_defaults();
    if (isset($getdirections_defaults['advanced_autocomplete']) && $getdirections_defaults['advanced_autocomplete']) {
      $found = TRUE;
    }
  }
  if (module_exists('getlocations_search')) {
    $getlocations_search_defaults = getlocations_search_defaults();
    if (isset($getlocations_search_defaults['method']) && $getlocations_search_defaults['method'] == 'google_ac') {
      $found = TRUE;
    }
  }
  return $found;
}