Browse Source

Coder.

pull/476/head
MorganDawe 11 years ago
parent
commit
75ab11b5ef
  1. 8
      includes/utilities.inc

8
includes/utilities.inc

@ -84,12 +84,10 @@ function islandora_temp_file_entry($file_name, $file_uri) {
function islandora_temp_file_delete($file_uri) { function islandora_temp_file_delete($file_uri) {
$files = file_load_multiple(array(), array('uri' => $file_uri)); $files = file_load_multiple(array(), array('uri' => $file_uri));
$file = reset($files); $file = reset($files);
dsm($file, "file to delete: ");
$success = file_delete($file); $success = file_delete($file);
if (!$success) { if (!$success) {
drupal_set_message( drupal_set_message(
t('An error occurred deleting derivitave file(s). '. t('An error occurred deleting derivitave file(s). see the system log for more information.'),
'see the system log for more information.'),
'error' 'error'
); );
watchdog( watchdog(
@ -97,14 +95,14 @@ function islandora_temp_file_delete($file_uri) {
'Attempting to delete %file in islandora_temp_file_delete(). Message %message', 'Attempting to delete %file in islandora_temp_file_delete(). Message %message',
array( array(
'%file' => $file_uri, '%file' => $file_uri,
'%message' => $success '%message' => $success,
), ),
WATCHDOG_WARNING WATCHDOG_WARNING
); );
return FALSE; return FALSE;
} }
drupal_set_message( drupal_set_message(
t('Temp file deleted successfully. '), t('Temp file deleted successfully.'),
'status' 'status'
); );
return TRUE; return TRUE;

Loading…
Cancel
Save