function getlocations_get_nodetype in Get Locations 7.2
Same name and namespace in other branches
- 6.2 getlocations.module \getlocations_get_nodetype()
- 6 getlocations.module \getlocations_get_nodetype()
- 7 getlocations.module \getlocations_get_nodetype()
1 call to getlocations_get_nodetype()
- getlocations_search_load_all_locations in modules/
getlocations_search/ getlocations_search.module
File
- ./
getlocations.module, line 2391 - getlocations.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Code
function getlocations_get_nodetype($nid) {
$query = db_select('node', 'n')
->fields('n', array(
'type',
))
->condition('n.nid', $nid);
$row = $query
->execute()
->fetchAssoc();
return isset($row['type']) && $row['type'] ? $row['type'] : FALSE;
}