function lingotek_sync_upload_node_finished in Lingotek Translation 7.5
Same name and namespace in other branches
- 7.7 lingotek.batch.inc \lingotek_sync_upload_node_finished()
- 7.4 lingotek.batch.inc \lingotek_sync_upload_node_finished()
- 7.6 lingotek.batch.inc \lingotek_sync_upload_node_finished()
2 string references to 'lingotek_sync_upload_node_finished'
- lingotek_grid_action_submit in ./
lingotek.bulk_grid.inc - Submit function for The Grid's actions The action corresponds to the key of the option selected Often redirects to batch operations or to other pages entirely
- lingotek_grid_upload_edited in ./
lingotek.bulk_grid.inc
File
- ./
lingotek.batch.inc, line 286 - Central location for batch create functions, before control is handed off to individual batch command files.
Code
function lingotek_sync_upload_node_finished($success, $results, $operations) {
if ($success) {
$count = isset($results['uploads']) ? $results['uploads'] : 0;
$message = format_plural($count, 'One entity uploaded to Lingotek.', '@count entities uploaded to Lingotek.');
$message .= isset($results['uploaded_nids']) && is_array($results['uploaded_nids']) ? ' (' . format_plural($count, 'entity id', 'entity ids') . ': ' . implode(", ", $results['uploaded_nids']) . ')' : '';
$message .= isset($results['disabled']) ? ' ' . t("<i>(Note: entities with the Disabled profile must be set to an enabled profile to be uploaded)</i>") : "";
$status = isset($results['disabled']) ? 'warning' : 'status';
drupal_set_message($message, $status);
}
else {
$message = t('Finished with an error.');
drupal_set_message($message, 'error');
}
}