From 5d1d9a863033e67c554b51f1ed02e303368041f8 Mon Sep 17 00:00:00 2001 From: willtp87 Date: Mon, 28 Jul 2014 17:00:13 +0000 Subject: [PATCH] validator fix --- includes/datastream.version.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/datastream.version.inc b/includes/datastream.version.inc index 515094bd..83a94aef 100644 --- a/includes/datastream.version.inc +++ b/includes/datastream.version.inc @@ -289,7 +289,7 @@ function islandora_datastream_version_replace_form($form, &$form_state, Abstract $ext = array_merge($ext, $extensions); } } - + $valid_extensions = implode(' ', $ext); $upload_size = min((int) ini_get('post_max_size'), (int) ini_get('upload_max_filesize')); return array( 'dsid_fieldset' => array( @@ -313,7 +313,7 @@ function islandora_datastream_version_replace_form($form, &$form_state, Abstract '#description' => t('Select a file to upload.
Files must be less than @size MB.', array('@size' => $upload_size)), '#upload_location' => 'temporary://', '#upload_validators' => array( - 'file_validate_extensions' => $ext, + 'file_validate_extensions' => array($valid_extensions), // Assume its specified in MB. 'file_validate_size' => array($upload_size * 1024 * 1024), ),