function smart_ip_update_db_batch_finished in Smart IP 6
Same name and namespace in other branches
- 6.2 includes/smart_ip.utility.inc \smart_ip_update_db_batch_finished()
- 7.2 includes/smart_ip.utility.inc \smart_ip_update_db_batch_finished()
- 7 includes/smart_ip.utility.inc \smart_ip_update_db_batch_finished()
Update Smart IP database batch 'finished' callback
1 string reference to 'smart_ip_update_db_batch_finished'
- smart_ip_update_db_batch in includes/
smart_ip.utility.inc - Prepare a batch definition
File
- includes/
smart_ip.utility.inc, line 369 - Utility routines to load the Smart IP database.
Code
function smart_ip_update_db_batch_finished($success, $results, $operations) {
if ($success) {
if (isset($results['#abort'])) {
// Set busy indicator to FALSE so that it can continue the
// process for the next try
variable_set('smart_ip_db_update_busy', FALSE);
drupal_set_message($results['#abort'], 'error');
}
else {
drupal_set_message(t('Smart IP database sucessfully updated.'));
}
}
else {
// An error occurred.
// $operations contains the operations that remained unprocessed.
$error_operation = reset($operations);
drupal_set_message(t('Error occurred while processing @operation with arguments : @args', array(
'@operation' => $error_operation[0],
'@args' => print_r($error_operation[0], TRUE),
)), 'error');
}
}