function menu_import_display_result in Menu Export/Import 7
Helper function to display result.
1 call to menu_import_display_result()
- menu_import_form_step2_submit in includes/
admin.inc - Step 2 form submit handler.
File
- includes/
admin.inc, line 330 - Administrative page callbacks for menu_import module.
Code
function menu_import_display_result(array $result) {
$msgs = menu_import_get_messages();
$total_items = $result['new_nodes'] + $result['matched_nodes'] + $result['external_links'] + $result['unknown_links'];
drupal_set_message(t($msgs['items_imported'], array(
'@count' => $total_items,
)));
if (empty($result['failed'])) {
unset($result['failed']);
}
foreach ($result as $type => $value) {
$msg_type = $type == 'failed' ? 'error' : 'status';
drupal_set_message(t($msgs[$type], array(
'@count' => $value,
)), $msg_type);
}
}