From 0732b7d142da13d67790d3445333fd8a48d4c0fb Mon Sep 17 00:00:00 2001 From: willtp87 Date: Wed, 5 Nov 2014 17:42:20 -0400 Subject: [PATCH] Less unnecessary datastream versions on replacement. --- includes/datastream.version.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/datastream.version.inc b/includes/datastream.version.inc index e97640d4..4f2a9960 100644 --- a/includes/datastream.version.inc +++ b/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);