Browse Source

Merge pull request #560 from willtp87/7.x.ds_versions

Less unnecessary datastream versions on replacement.
pull/562/head
Adam 10 years ago
parent
commit
ffabee5823
  1. 2
      includes/datastream.version.inc

2
includes/datastream.version.inc

@ -344,7 +344,9 @@ function islandora_datastream_version_replace_form_submit($form, &$form_state) {
$file = file_load($form_state['values']['file']); $file = file_load($form_state['values']['file']);
try { try {
$ds = $object[$form_state['dsid']]; $ds = $object[$form_state['dsid']];
if ($ds->mimetype != $file->filemime) {
$ds->mimetype = $file->filemime; $ds->mimetype = $file->filemime;
}
$path = drupal_realpath($file->uri); $path = drupal_realpath($file->uri);
$ds->setContentFromFile($path); $ds->setContentFromFile($path);
file_delete($file); file_delete($file);

Loading…
Cancel
Save