You are here

function location_search_locationapi in Location 5.3

Same name and namespace in other branches
  1. 6.3 contrib/location_search/location_search.module \location_search_locationapi()
  2. 7.5 contrib/location_search/location_search.module \location_search_locationapi()
  3. 7.3 contrib/location_search/location_search.module \location_search_locationapi()
  4. 7.4 contrib/location_search/location_search.module \location_search_locationapi()

Implementation of hook_locationapi().

File

contrib/location_search/location_search.module, line 317
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_query('DELETE FROM {location_search_work} WHERE lid = %d', $obj['lid']);
    db_query('INSERT INTO {location_search_work} (lid) VALUES (%d)', $obj['lid']);
  }
  if ($op == 'delete') {
    search_wipe($obj['lid'], 'location');
  }
}