diff --git a/file_entity.pages.inc b/file_entity.pages.inc index 3d8559c..9e8481f 100644 --- a/file_entity.pages.inc +++ b/file_entity.pages.inc @@ -665,9 +665,8 @@ function file_entity_delete_form($form, &$form_state, $file) { '#value' => $file->fid, ); - $description = t('This action cannot be undone.'); if ($references = file_usage_list($file)) { - $description .= ' ' . t('This file is currently in use and may cause problems if deleted.'); + drupal_set_message(t('This file is currently in use and may cause problems if deleted.', array('@url' => url('file/' . $file->fid . '/usage'))), 'warning'); } return confirm_form($form, @@ -675,7 +674,7 @@ function file_entity_delete_form($form, &$form_state, $file) { '%title' => entity_label('file', $file), )), 'file/' . $file->fid, - $description, + t('This action cannot be undone.'), t('Delete') ); } @@ -740,16 +739,15 @@ function file_entity_multiple_delete_form($form, &$form_state, array $files) { '#value' => 'delete', ); - $description = t('This action cannot be undone.'); if ($files_have_usage) { - $description .= ' ' . t('Some of the files are currently in use and may cause problems if deleted.'); + drupal_set_message(t('Some of the files are currently in use and may cause problems if deleted.'), 'warning'); } return confirm_form( $form, format_plural(count($files), 'Are you sure you want to delete this file?', 'Are you sure you want to delete these files?'), 'admin/content/file', - $description, + t('This action cannot be undone.'), t('Delete') ); }