function location_search_locationapi in Location 7.3
Same name and namespace in other branches
- 5.3 contrib/location_search/location_search.module \location_search_locationapi()
- 6.3 contrib/location_search/location_search.module \location_search_locationapi()
- 7.5 contrib/location_search/location_search.module \location_search_locationapi()
- 7.4 contrib/location_search/location_search.module \location_search_locationapi()
Implements hook_locationapi().
File
- contrib/
location_search/ location_search.module, line 465 - Location search interface.
Code
function location_search_locationapi(&$obj, $op, $a3 = NULL, $a4 = NULL, $a5 = NULL) {
if ($op == 'save') {
// Ensure the changed location is in our work list.
db_delete('location_search_work')
->condition('lid', $obj['lid'])
->execute();
db_insert('location_search_work')
->fields(array(
'lid' => $obj['lid'],
))
->execute();
}
if ($op == 'delete') {
search_reindex($obj['lid'], 'location');
}
}