From 7b5a601128e297b24964ee5587f13dedbc6791b8 Mon Sep 17 00:00:00 2001 From: Brandon Weigel Date: Tue, 27 Feb 2018 15:04:06 +0000 Subject: [PATCH] Show list of objects to confirmation page --- includes/orphaned_objects.inc | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/includes/orphaned_objects.inc b/includes/orphaned_objects.inc index e4a861cd..6ac54115 100644 --- a/includes/orphaned_objects.inc +++ b/includes/orphaned_objects.inc @@ -18,11 +18,23 @@ */ function islandora_orphaned_objects_manage_form($form, $form_state) { if (isset($form_state['show_confirm'])) { + $pids = $form_state['pids_to_delete']; + if (count($form_state['pids_to_delete']) == 1) { + $pid_paths = '' . $pids[0] . ''; + } + elseif (count($form_state['pids_to_delete']) <= 10) { + $pid_paths = ''; + } $form['confirm_message'] = array( '#type' => 'item', '#markup' => format_plural(count($form_state['pids_to_delete']), - 'Are you sure you want to delete the 1 object?', - 'Are you sure you want to delete the @count objects?'), + 'Are you sure you want to delete the object ' . $pid_paths . '? This action cannot be reversed.', + 'Are you sure you want to delete these @count objects? This action cannot be reversed.' . $pid_paths), ); $form['confirm_submit'] = array( '#type' => 'submit',