function la_batch in Location 7.3
Fill all locations using google geocode.
1 call to la_batch()
- la_admin_submit in contrib/
location_autofill/ la.admin.inc - Admin form submit handler.
File
- contrib/
location_autofill/ la.module, line 59 - Location autofill routines.
Code
function la_batch() {
$empty_locations = db_select('location', 'l')
->fields('l', array(
'lid',
))
->condition('latitude', '0.000000')
->condition('longitude', '0.000000')
->execute()
->rowCount();
if ($empty_locations = 0) {
return;
}
// Reset counter for debug information.
$_SESSION['http_request_count'] = 0;
// Execute the function named la_batch_run.
$function = 'la_batch_run';
$batch = $function();
batch_set($batch);
}