function getdirections_get_lid_title in Get Directions 7.2
Same name and namespace in other branches
- 6.2 getdirections.module \getdirections_get_lid_title()
- 7.3 getdirections.module \getdirections_get_lid_title()
1 call to getdirections_get_lid_title()
- getdirections_direction in ./
getdirections.module - Function to setup the map and form
File
- ./
getdirections.module, line 1512 - Fetches google map directions.
Code
function getdirections_get_lid_title($lid) {
if ($lid) {
$query = FALSE;
if (module_exists('getlocations_fields')) {
$query = db_select('getlocations_fields', 'i')
->fields('i', array(
'name',
))
->condition('i.glid', $lid);
}
elseif (module_exists('location')) {
$query = db_select('location', 'i')
->fields('i', array(
'name',
))
->condition('i.lid', $lid);
}
if ($query) {
$row = $query
->execute()
->fetchAssoc();
return isset($row['name']) && $row['name'] ? $row['name'] : FALSE;
}
}
return FALSE;
}