function location_update_index in Location 5.3
Same name and namespace in other branches
- 6.3 contrib/location_search/location_search.module \location_update_index()
- 7.5 contrib/location_search/location_search.module \location_update_index()
- 7.3 contrib/location_search/location_search.module \location_update_index()
- 7.4 contrib/location_search/location_search.module \location_update_index()
Implementation of hook_update_index().
File
- contrib/
location_search/ location_search.module, line 300 - Location search interface.
Code
function location_update_index() {
$limit = (int) variable_get('search_cron_limit', 100);
$result = db_query_range('SELECT lid FROM {location_search_work}', 0, $limit);
while ($row = db_fetch_object($result)) {
$loc = location_load_location($row->lid);
$text = theme('location', $loc, array());
// @@@ hide?
search_index($row->lid, 'location', $text);
db_query('DELETE FROM {location_search_work} WHERE lid = %d', $row->lid);
}
}