Browse Source

Less unnecessary datastream versions on replacement.

pull/560/head
willtp87 10 years ago
parent
commit
0732b7d142
  1. 4
      includes/datastream.version.inc

4
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']);
try {
$ds = $object[$form_state['dsid']];
$ds->mimetype = $file->filemime;
if ($ds->mimetype != $file->filemime) {
$ds->mimetype = $file->filemime;
}
$path = drupal_realpath($file->uri);
$ds->setContentFromFile($path);
file_delete($file);

Loading…
Cancel
Save